我是angular的新手,我只想更新一些包并解决这个问题。我一直在寻找这个问题,但没有找到有用的答案。
这里是错误=>
Schema validation failed with the following errors:
Data path "" should NOT have additional properties(rebaseRootRelativeCssUrls).
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! web@1.0.1 start: `ng serve --ssl`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the web@1.0.1 start 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:UsersmeAppDataRoamingnpm-cache_logs2020-12-21T07_08_11_784Z-debug.log
这里是完整日志=>
> 0 info it worked if it ends with ok
> 1 verbose cli [
> 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 'start'
> 1 verbose cli ]
> 2 info using npm@6.14.6
> 3 info using node@v12.18.4
> 4 verbose run-script [ 'prestart', 'start', 'poststart' ]
> 5 info lifecycle web@1.0.1~prestart: web@1.0.1
> 6 info lifecycle web@1.0.1~start: web@1.0.1
> 7 verbose lifecycle web@1.0.1~start: unsafe-perm in lifecycle true
> 8 verbose lifecycle web@1.0.1~start: PATH of Environment
> 9 verbose lifecycle web@1.0.1~start: CWD: C:meProject1web
> 10 silly lifecycle web@1.0.1~start: Args: [ '/d /s /c', 'ng serve --ssl' ]
> 11 silly lifecycle web@1.0.1~start: Returned: code: 1 signal: null
> 12 info lifecycle web@1.0.1~start: Failed to exec start script
> 13 verbose stack Error: web@1.0.1 start: `ng serve --ssl`
> 13 verbose stack Exit status 1
> 13 verbose stack at EventEmitter.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecycleindex.js:332:16)
> 13 verbose stack at EventEmitter.emit (events.js:315:20)
> 13 verbose stack at ChildProcess.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14)
> 13 verbose stack at ChildProcess.emit (events.js:315:20)
> 13 verbose stack at maybeClose (internal/child_process.js:1021:16)
> 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
> 14 verbose pkgid web@1.0.1
> 15 verbose cwd C:meProject1web
> 16 verbose Windows_NT 10.0.19041
> 17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
> 18 verbose node v12.18.4
> 19 verbose npm v6.14.6
> 20 error code ELIFECYCLE
> 21 error errno 1
> 22 error web@1.0.1 start: `ng serve --ssl`
> 22 error Exit status 1
> 23 error Failed at the web@1.0.1 start script.
> 23 error This is probably not a problem with npm. There is likely additional logging output above.
> 24 verbose exit [ 1, true ]
请告诉我这个错误发生的原因或想法?
我认为package-lock.json
和node
模块是问题的原因。
尝试:
- 删除
node-modules
和package-lock.json
npm clean cache --force
npm install
我通过从angular.json
中删除rebaseRootRelativeCssUrls
行来解决这个问题。