Npm 我在安装angular cli时收到以下错误

Npm 我在安装angular cli时收到以下错误,npm,path,angular-cli,node-modules,Npm,Path,Angular Cli,Node Modules,我再次遇到angular cli问题(在mac上)。这是我的日志。我尝试卸载安装程序,但得到完全相同的错误。有什么建议吗?很可能是路径问题 0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'build', 'dev' ] 2 info using npm@3.10.10 3 info using node@v6.10.3

我再次遇到angular cli问题(在mac上)。这是我的日志。我尝试卸载安装程序,但得到完全相同的错误。有什么建议吗?很可能是路径问题

  0 info it worked if it ends with ok
    1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'build', 'dev' ]
    2 info using npm@3.10.10
    3 info using node@v6.10.3
    4 info build /Users/user/Documents/Sites/website/dev
    5 verbose stack Error: ENOENT: no such file or directory, open '/Users/user/Documents/Sites/website/dev/package.json'
    5 verbose stack     at Error (native)
    6 verbose cwd /Users/user/Documents/Sites/website
    7 error Darwin 16.5.0
    8 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "build" "dev"
    9 error node v6.10.3
    10 error npm  v3.10.10
    11 error path /Users/user/Documents/Sites/website/dev/package.json
    12 error code ENOENT
    13 error errno -2
    14 error syscall open
    15 error enoent ENOENT: no such file or directory, open '/Users/user/Documents/Sites/website/dev/package.json'
    16 error enoent ENOENT: no such file or directory, open '/Users/user/Documents/Sites/website/dev/package.json'
    16 error enoent This is most likely not a problem with npm itself
    16 error enoent and is related to npm not being able to find a file.
    17 verbose exit [ -2, true ]

您必须检查是否执行了npm--init,因为可能会发生这样的情况:您忘记初始化npm,并且根据错误的第5行,不存在package.json文件

如果不起作用,请尝试此npm安装npm@latest-g

如果这也不起作用,请尝试以下方法:

1. Ensure dependencies described correctly on package.json
2. Then type npm install and Enter.
3. Check issue still exists. and If issue not resolved, continue these 
   methods.
4. type npm cache clean and hit Enter
5. type sudo npm install -g npm and hit Enter.
6. Retry npm install and hit Enter.

谢谢修复它,现在我有问题安装角/材料,一天已经过去了,嘘!根据堆栈溢出策略,您应该将答案向上投票或单击复选框作为问题的答案,而不是评论感谢,顺便说一句,欢迎;P安装角/材料时,您面临什么问题?