gpt4 book ai didi

node.js - npm 安装失败并出现错误

转载 作者:太空宇宙 更新时间:2023-11-04 03:29:34 25 4
gpt4 key购买 nike

我正在关注本教程 enter link description here但我被困在 12:41 了。我按照视频描述中的链接下载了种子项目,并以 Windows 7 管理员身份发出 somman npm install 。但我收到以下错误:

C:\development\angular2\angular2-seed>npm install

> angular2-quickstart@1.0.0 postinstall C:\development\angular2\angular2-seed
> typings install

(I translated following lines to English)
typings is not name of an command, executable or batch.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ch
okidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"
})
npm WARN angular2-quickstart@1.0.0 No description
npm WARN angular2-quickstart@1.0.0 No repository field.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\A
ppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.6.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! angular2-quickstart@1.0.0 postinstall: `typings install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-quickstart@1.0.0 postinstall script 'typings ins
tall'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-quickstart p
ackage,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! typings install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-quickstart
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\development\angular2\angular2-seed\npm-debug.log

请指教。谢谢。

编辑:附加文件npm-debug.log:enter link description here附文件package.json:enter link description here

最佳答案

权限问题。可能与windows中的路径名有关。

在 Git Bash 或 Windows Powershell 中检查相同内容。

您可以设置 NODE 路径,如下所示:set NODE_PATH=source

删除node_modules并再次运行npm install

关于node.js - npm 安装失败并出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40103850/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com