简体   繁体   English

NPM Start无法正常运行(无法在Mac OS X Yosemite上运行Node)

[英]NPM Start isn't working (Can't get Node working on Mac OS X Yosemite)

I'm a Rails guy, but I'm trying to learn a bit of Angular JS. 我是一个Rails家伙,但是我想学习一些Angular JS。 I wanted to go through this tutorial , but I can't even get a node server to start running. 我想完成本教程 ,但是我什至无法让节点服务器开始运行。

Below is the npm-debug.log file 以下是npm-debug.log文件

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'start' ]
2 info using npm@2.7.4
3 info using node@v0.12.2
4 verbose config Skipping project config: /Users/piratetone/.npmrc. (matches userconfig)
5 verbose stack Error: ENOENT, open '/Users/piratetone/package.json'
5 verbose stack     at Error (native)
6 verbose cwd /Users/piratetone/js_projects
7 error Darwin 14.1.0
8 error argv "node" "/usr/local/bin/npm" "start"
9 error node v0.12.2
10 error npm  v2.7.4
11 error path /Users/piratetone/package.json
12 error code ENOENT
13 error errno -2
14 error enoent ENOENT, open '/Users/piratetone/package.json'
14 error enoent This is most likely not a problem with npm itself
14 error enoent and is related to npm not being able to find a file.
15 verbose exit [ -2, true ]

Found the answer in this tutorial here. 这里找到本教程的答案 Also, after getting everything completed there, I also needed sudo to install. 另外,在完成所有操作之后,我还需要sudo进行安装。

sudo npm start

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM