角对我来说是很新的,英语不是我的第一语言,所以我提前道歉。我是一名学生,我必须用普通的平台做一个应用程序。在大学里,我们从来没有使用过任何普通的组件,或者javascript,但是现在我必须做这个项目。我正在学习这个教程,->,https://www.youtube.com/watch?v=wtIvu085uU0&list=PLTPtZWpWLI00vlAPQnDt8OlPwoYxuMCQo&index=4,视频播放到45分钟,一切都进行得很好。在45分钟,它说我必须安装@angular/cli
,但我得到错误,我第一次这样做。然后我再次尝试输入npm install @angular/cli
,然后没有出现错误。就像应该的一样,就像在视频里一样。但是,当我输入ng new client
时,上面写着
ng is not recognized as an internal or external command, operable program or batch file.
我不知道该怎么做,我试着重新安装了几次,但是每次都是一样的。我很绝望。
版本:
节点--版本= v6.11.3 npm -版本= 3.10.10
Windows 10
输入“@角/cli”时会出现错误:
npm ERR! tarball.destroy is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! github
npm WARN retry will retry, error on last attempt: Error: EBUSY: resource busy or locked, rename 'C:\Users\Loran\AppData\Local\Temp\npm-9616-ee3846a1\registry.npmjs.org\eventemitter3-\eventemitter3-1.2.0.tgz.1057597416' -> 'C:\Users\Loran\AppData\Local\Temp\npm-9616-ee3846a1\registry.npmjs.org\eventemitter3-\eventemitter3-1.2.0.tgz'
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "@angular/cli"
npm ERR! node v6.11.3
npm ERR! npm v3.10.10
npm ERR! tarball.destroy is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! github
kontakti@1.0.0 D:\Project\kontakti
`-- @angular/cli@1.4.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN kontakti@1.0.0 No description
npm WARN kontakti@1.0.0 No repository field.
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "@angular/cli"
npm ERR! node v6.11.3
npm ERR! npm v3.10.10
npm ERR! Callback called more than once.
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! github
npm ERR! Please include the following file with any support request:
npm ERR! D:\Project\kontakti\npm-debug.log
发布于 2018-05-07 23:26:28
对于这些版本:
节点--版本= v6.11.3 npm -版本= 3.10.10
你应该试试角CLI 4
$npm install -g @angular/cli@1.4
发布于 2021-02-18 16:06:44
要在终端中使用ng
命令,需要全局安装角CLI。
运行以下命令来安装:npm install -g @angular/cli
。
https://stackoverflow.com/questions/46123700
复制相似问题