启动npm报错

使用 npm start启动npm,提示错误:

> leclient@1.0.0 start /Users/nigellee/Documents/LeMobileClient-ReactNative

> node node_modules/react-native/local-cli/cli.js start


module.js:472

    throw err;

    ^


Error: Cannot find module '/Users/nigellee/Documents/LeMobileClient-ReactNative/node_modules/react-native/local-cli/cli.js'

    at Function.Module._resolveFilename (module.js:470:15)

    at Function.Module._load (module.js:418:25)

    at Module.runMain (module.js:605:10)

    at run (bootstrap_node.js:425:7)

    at startup (bootstrap_node.js:146:9)

    at bootstrap_node.js:540:3


npm ERR! Darwin 16.0.0

npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"

npm ERR! node v7.7.2

npm ERR! npm  v4.1.2

npm ERR! code ELIFECYCLE

npm ERR! leclient@1.0.0 start: `node node_modules/react-native/local-cli/cli.js start`

npm ERR! Exit status 1

npm ERR! 

npm ERR! Failed at the leclient@1.0.0 start script 'node node_modules/react-native/local-cli/cli.js start'.

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 leclient package,

npm ERR! not with npm itself.

npm ERR! Tell the author that this fails on your system:

npm ERR!     node node_modules/react-native/local-cli/cli.js start

npm ERR! You can get information on how to open an issue for this project with:

npm ERR!     npm bugs leclient

npm ERR! Or if that isn't available, you can get their info via:

npm ERR!     npm owner ls leclient

npm ERR! There is likely additional logging output above.

npm WARN Local package.json exists, but node_modules missing, did you mean to install?


npm ERR! Please include the following file with any support request:

npm ERR!     /Users/nigellee/Documents/LeMobileClient-ReactNative/npm-debug.log


解决办法:npm install重新安装以后,配置:

npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global
即可

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值