Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm start 项目运行不起来 #15

Open
loyawang opened this issue Apr 25, 2017 · 9 comments
Open

npm start 项目运行不起来 #15

loyawang opened this issue Apr 25, 2017 · 9 comments

Comments

@loyawang
Copy link

`> @0.0.1 start D:\practice\demoList\apple-basket-redux

node server.js --env=dev

events.js:163
throw er; // Unhandled 'error' event
^

Error: listen EACCES 127.0.0.1:8000
at Object.exports._errnoException (util.js:1034:11)
at exports._exceptionWithHostPort (util.js:1057:20)
at Server._listen2 (net.js:1252:19)
at listen (net.js:1301:10)
at doListening (net.js:1416:7)
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:78:10)

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @0.0.1 start: node server.js --env=dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @0.0.1 start script 'node server.js --env=dev'.
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 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js --env=dev
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\wang.ya\AppData\Roaming\npm-cache_logs\2017-04-25T07_30_05_708Z-debug.log
`

@ckinmind
Copy link
Owner

@loyawang 首先很抱歉你遇到的问题,看了你的错误日志然后我自己尝试了一下,应该是你的node版本太高了,我用7.9.0的node版本运行也运行不起来,用6.10.0的node版本可以,这个和脚手架有关系,你可以安装一个node的版本管理工具n或者nvm然后下一个6.10.0的版本,切换过去再运行试试

希望回复能对你有帮助

@loyawang
Copy link
Author

将node版本降到6.10.0,还是不成功

@ckinmind
Copy link
Owner

@loyawang 有报错信息吗

@yang-ren-ting
Copy link

你好,我也把node 切换到6.10.0了,intall 最后报错下面信息,有解决方案吗
npm ERR! code ELIFECYCLE

npm ERR! phantomjs-prebuilt@2.1.14 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.14 install script 'node install.js'.
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 phantomjs-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs phantomjs-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/leonel/Desktop/apple-basket-redux/npm-debug.log

@ckinmind
Copy link
Owner

@yang-ren-ting 很抱歉,看问题好像是下载phantomjs-prebuilt包遇到问题,我之前都是使用cnpm下载的没遇到问题,使用npm install就遇到问题,你试试使用cnpm install方式,使用淘宝源可以下载到这个包

参考资料:PhantomJS not found on PATH

@xiongguixiu
Copy link

http://127.0.0.1:8000/webpack-dev-server/
运行成功了,但是浏览器上面报错

ENOENT: no such file or directory, scandir 'G:\web\code\apple-basket-redux-master\node_modules\node-sass\vendor'
@ ./src/styles/appleBasket.scss 4:14-145 13:2-17:4 14:20-151

ENOENT: no such file or directory, scandir 'G:\web\code\apple-basket-redux-master\node_modules\node-sass\vendor'
@ ./src/styles/appleItem.scss 4:14-143 13:2-17:4 14:20-149

@ckinmind
Copy link
Owner

@xiongguixiu 看下你的node_modules下的node-sass是什么版本

@markma98
Copy link

默认是4.5.0,改成4.5.3就好了

@David-jikeizod
Copy link

http://127.0.0.1:8000/webpack-dev-server/
运行成功了,但是浏览器上面报错

ENOENT: no such file or directory, scandir 'G:\web\code\apple-basket-redux-master\node_modules\node-sass\vendor'
@ ./src/styles/appleBasket.scss 4:14-145 13:2-17:4 14:20-151

ENOENT: no such file or directory, scandir 'G:\web\code\apple-basket-redux-master\node_modules\node-sass\vendor'
@ ./src/styles/appleItem.scss 4:14-143 13:2-17:4 14:20-149

兄弟,怎么解决的?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants