我已经使用命令 npm install -g @angular/cli 安装了 angular-cli。当我尝试运行命令 ng new 并创建新项目时,出现错误:
\n\xe2\xa0\x99 Installing packages (npm)...npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated\nnpm ERR! code E404\nnpm ERR! 404 Not Found - GET https://registry.npmjs.org/@types/eslint/-/eslint-8.4.4.tgz - Not found\nnpm ERR! 404 \nnpm ERR! 404 '@types/eslint@https://registry.npmjs.org/@types/eslint/-/eslint-8.4.4.tgz' is not in this registry.\nnpm ERR! 404 You should bug the author to publish it (or use the name yourself!)\nnpm ERR! 404 \nnpm ERR! 404 Note that you can also install from a\nnpm ERR! 404 tarball, folder, http url, or git url.\n
Run Code Online (Sandbox Code Playgroud)\n这个错误应该如何解决?
\nJAS*_*S90 31
当其他人尝试安装 React 或任何其他依赖于 eslint 的框架时,也会发生这种情况。
create-react-app 中止 - 未找到 ESLINT
这是 Eslint github 的链接:https ://github.com/DefinitelyTyped/DefinitelyTyped/issues/61032
目前的解决方法是运行ng new app --skip-install
,然后添加"@types/eslint": "8.4.3"
到 package.json 并执行npm install
。
归档时间: |
|
查看次数: |
4678 次 |
最近记录: |