I have a vue NodeJs project copied from other computer, it can run on other computer, I have installed node js on this computer, just can't run this project like other computer. I need to find out where the problem is. Npm version is 7.21.1, Node js version is 16.9.1。 I execute npm run serve and it shows errors:
npm ERR! invalid options argument
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache\_logs\2021-10-01T07_07_50_208Z-debug.log
98% after emitting CopyPlugin
Full error log and package.json are down below Full error log:
0 verbose cli [
0 verbose cli 'D:\\NodeJS\\node.exe',
0 verbose cli 'D:\\NodeJS\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'run',
0 verbose cli 'serve'
0 verbose cli ]
1 info using npm@7.21.1
2 info using node@v16.9.1
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:D:\NodeJS\node_modules\npm\npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 3ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:D:\JetBrainsProject\hospital_full\vue\.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:C:\Users\Administrator\.npmrc Completed in 0ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:C:\Users\Administrator\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 11ms
19 timing npm:load:configload Completed in 12ms
20 timing npm:load:setTitle Completed in 0ms
21 timing npm:load:setupLog Completed in 1ms
22 timing config:load:flatten Completed in 3ms
23 timing npm:load:cleanupLog Completed in 2ms
24 timing npm:load:configScope Completed in 0ms
25 timing npm:load:projectScope Completed in 1ms
26 timing npm:load Completed in 20ms
27 verbose stack TypeError: invalid options argument
27 verbose stack at optsArg (D:\NodeJS\node_modules\npm\node_modules\mkdirp\lib\opts-arg.js:13:11)
27 verbose stack at mkdirp (D:\NodeJS\node_modules\npm\node_modules\mkdirp\index.js:11:10)
27 verbose stack at tryCatcher (D:\NodeJS\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
27 verbose stack at ret (eval at makeNodePromisifiedEval (D:\NodeJS\node_modules\npm\node_modules\bluebird\js\release\promisify.js:184:12), <anonymous>:13:39)
27 verbose stack at Object.mkdirfix (D:\NodeJS\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\lib\util\fix-owner.js:36:10)
27 verbose stack at makeTmp (D:\NodeJS\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\lib\content\write.js:121:19)
27 verbose stack at write (D:\NodeJS\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\lib\content\write.js:35:19)
27 verbose stack at putData (D:\NodeJS\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\put.js:11:10)
27 verbose stack at Object.x.put (D:\NodeJS\node_modules\npm\node_modules\npm-registry-fetch\node_modules\cacache\locales\en.js:28:37)
27 verbose stack at WriteStream._flush (D:\NodeJS\node_modules\npm\node_modules\npm-registry-fetch\node_modules\make-fetch-happen\cache.js:156:21)
27 verbose stack at WriteStream._write (D:\NodeJS\node_modules\npm\node_modules\flush-write-stream\index.js:36:35)
27 verbose stack at doWrite (D:\NodeJS\node_modules\npm\node_modules\readable-stream\lib\_stream_writable.js:428:64)
27 verbose stack at writeOrBuffer (D:\NodeJS\node_modules\npm\node_modules\readable-stream\lib\_stream_writable.js:417:5)
27 verbose stack at WriteStream.Writable.write (D:\NodeJS\node_modules\npm\node_modules\readable-stream\lib\_stream_writable.js:334:11)
27 verbose stack at WriteStream.end (D:\NodeJS\node_modules\npm\node_modules\flush-write-stream\index.js:45:41)
27 verbose stack at WriteStream.end (D:\NodeJS\node_modules\npm\node_modules\flush-write-stream\index.js:42:47)
28 verbose cwd D:\JetBrainsProject\hospital_full\vue
29 verbose Windows_NT 10.0.19042
30 verbose argv "D:\\NodeJS\\node.exe" "D:\\NodeJS\\node_modules\\npm\\bin\\npm-cli.js" "run" "serve"
31 verbose node v16.9.1
32 verbose npm v7.21.1
33 error invalid options argument
34 verbose exit 1
package.json:
{
"name": "vue-hk",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"axios": "^0.20.0",
"core-js": "^3.6.5",
"element-ui": "^2.4.5",
"vue": "^2.6.11",
"vue-axios": "^3.3.7",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-plugin-component": "^1.1.1",
"less": "^3.12.2",
"less-loader": "^7.0.1",
"vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.11"
}
}
CodePudding user response:
fixed, i cant't even create a new node npm project on this pc, same type error shows up when i use idea create a new node npm project, node js itself might be the problem, i reinstalled node and all works