【问题标题】:Data path "" should NOT have additional properties(rebaseRootRelativeCssUrls)数据路径“”不应具有其他属性(rebaseRootRelativeCssUrls)
【发布时间】:2021-03-30 23:37:16
【问题描述】:

我是 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:\Users\me\AppData\Roaming\npm-cache\_logs\2020-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:\me\Project1\web
>     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 Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
>     13 verbose stack     at EventEmitter.emit (events.js:315:20)
>     13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.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:\me\Project1\web
>     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 ]

请问有什么想法或发生此错误的任何原因吗?

【问题讨论】:

    标签: npm angular-cli angular10


    【解决方案1】:

    我认为package-lock.jsonnode 模块是问题的原因。

    试试:

    1. 删除node-modulespackage-lock.json
    2. npm clean cache --force
    3. npm install

    【讨论】:

    • 嗨!谢谢@Asher。我正在尝试全新安装 RN。我相信你的意思是 ``` 2. npm cache clean --force ``` 不过,是吗?
    猜你喜欢
    • 2020-12-10
    • 2021-04-01
    • 2019-06-14
    • 1970-01-01
    • 1970-01-01
    • 2019-06-24
    • 2022-01-17
    • 1970-01-01
    • 2021-06-19
    相关资源
    最近更新 更多