错误和日志
build 出来的东西有几个 js error
PS C:\Users\tomvi\Desktop\app> npm run mp
> [email protected] mp C:\Users\tomvi\Desktop\app
> cross-env MP_ENV=miniprogram vue-cli-service build --mode development --dest ./dist/mp/common --watch
vue.config
/ Building for development...
dependencies has been built
ERROR Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] mp: `cross-env MP_ENV=miniprogram vue-cli-service build --mode development --dest ./dist/mp/common --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] mp script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\tomvi\AppData\Roaming\npm-cache\_logs\2020-06-30T03_29_00_880Z-debug.log
PS C:\Users\tomvi\Desktop\app>
C:\Users\tomvi\AppData\Roaming\npm-cache_logs\2020-06-30T03_29_00_880Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'mp' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'premp', 'mp', 'postmp' ]
5 info lifecycle [email protected]~premp: [email protected]
6 info lifecycle [email protected]~mp: [email protected]
7 verbose lifecycle [email protected]~mp: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~mp: PATH: C:\Users\tomvi\AppData\Roaming\nvm\v10.16.3\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\tomvi\Desktop\app\node_modules\.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;%NVM_HOME%;%NVM_SYMLINK%;C:\Program Files\Git\cmd;C:\Users\tomvi\AppData\Local\Microsoft\WindowsApps;C:\Users\tomvi\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\tomvi\AppData\Roaming\nvm;C:\Program Files\nodejs
9 verbose lifecycle [email protected]~mp: CWD: C:\Users\tomvi\Desktop\app
10 silly lifecycle [email protected]~mp: Args: [ '/d /s /c',
10 silly lifecycle 'cross-env MP_ENV=miniprogram vue-cli-service build --mode development --dest ./dist/mp/common --watch' ]
11 silly lifecycle [email protected]~mp: Returned: code: 1 signal: null
12 info lifecycle [email protected]~mp: Failed to exec mp script
13 verbose stack Error: [email protected] mp: `cross-env MP_ENV=miniprogram vue-cli-service build --mode development --dest ./dist/mp/common --watch`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\tomvi\AppData\Roaming\nvm\v10.16.3\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\tomvi\AppData\Roaming\nvm\v10.16.3\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\tomvi\Desktop\app
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "mp"
18 verbose node v10.16.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] mp: `cross-env MP_ENV=miniprogram vue-cli-service build --mode development --dest ./dist/mp/common --watch`
22 error Exit status 1
23 error Failed at the [email protected] mp script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
1
onfuns 2020-06-30 14:17:11 +08:00
权限不够,右键命令行工具管理员运行。
|
3
maojy1989 2020-06-30 16:50:30 +08:00
用 npm cache clean --force 清除缓存然后删除 node_modules 跟 package-lock.json 再重新安装试试
|
4
96412hj 2020-07-02 10:03:23 +08:00
你是不是吧 package.lock.json 删了
|