У меня есть проект Vue, который прекрасно компилируется на моей машине.Сегодня я приступил к настройке развертывания на платформе DevOps Azure, которая работает нормально, пока не будет вызвана «npm run build».Оттуда я получаю несколько ошибок «ELIFECYCLE», что мне мало помогает.То, что я до сих пор пробовал:
- Попытался удалить оба node_modules и package-lock.json с помощью
npm clean cache
и с помощью команды удаления cmd delete - Пробовал в Linux и Windows производствамашины
Что мне здесь не хватает?
[command]C:\windows\system32\cmd.exe /D /S /C "C:\npm\prefix\npm.cmd run build"
- Building for production...
ERROR Build failed with errors.
> appwork-vue-starter@1.2.1 build D:\_work\1\s
npm ERR! code ELIFECYCLE
> vue-cli-service build
npm ERR! errno 1
npm ERR! appwork-vue-starter@1.2.1 build: `vue-cli-service build`
npm ERR! Exit status 1
ERROR Failed to compile with 1 errors9:12:59 PM
npm ERR!
npm ERR! Failed at the appwork-vue-starter@1.2.1 build script.
This relative module was not found:
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
* ./Router in ./src/main.js
npm ERR! A complete log of this run can be found in:
npm ERR! C:\npm\cache\_logs\2019-02-26T21_13_00_370Z-debug.log
Found npm debug log, make sure the path matches with the one in npm's output: C:\npm\cache\_logs\2019-02-26T21_13_00_370Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\npm\\prefix\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm@6.7.0
3 info using node@v10.15.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle appwork-vue-starter@1.2.1~prebuild: appwork-vue-starter@1.2.1
6 info lifecycle appwork-vue-starter@1.2.1~build: appwork-vue-starter@1.2.1
7 verbose lifecycle appwork-vue-starter@1.2.1~build: unsafe-perm in lifecycle true
8 verbose lifecycle appwork-vue-starter@1.2.1~build: PATH: C:\npm\prefix\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\_work\1\s\node_modules\.bin;C:\agents\2.147.1\externals\git\cmd;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\dotnet;C:\npm\prefix;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\ProgramData\Chocolatey\bin;C:\Users\packer\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Docker;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Subversion\bin;C:\Users\VssAdministrator\AppData\Local\Microsoft\WindowsApps
9 verbose lifecycle appwork-vue-starter@1.2.1~build: CWD: D:\_work\1\s
10 silly lifecycle appwork-vue-starter@1.2.1~build: Args: [ '/d /s /c', 'vue-cli-service build' ]
11 silly lifecycle appwork-vue-starter@1.2.1~build: Returned: code: 1 signal: null
12 info lifecycle appwork-vue-starter@1.2.1~build: Failed to exec build script
13 verbose stack Error: appwork-vue-starter@1.2.1 build: `vue-cli-service build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\npm\prefix\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess.<anonymous> (C:\npm\prefix\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid appwork-vue-starter@1.2.1
15 verbose cwd D:\_work\1\s
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\npm\\prefix\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v10.15.1
19 verbose npm v6.7.0
20 error code ELIFECYCLE
21 error errno 1
22 error appwork-vue-starter@1.2.1 build: `vue-cli-service build`
22 error Exit status 1
23 error Failed at the appwork-vue-starter@1.2.1 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
##[error]Error: Npm failed with return code: 1
##[section]Finishing: npm run build