美文网首页
npm install -g yarn react-native

npm install -g yarn react-native

作者: xiaoyi6409 | 来源:发表于2017-07-24 14:11 被阅读359次
  • 当执行npm install -g yarn react-native-cli命令时遇到了如下报错,先执行如下命令clean cache后,再执行npm install -g yarn react-native-cli不再报错
    npm cache clean --force

错误如下:

82 verbose stack SyntaxError: Unexpected end of input at 1:10970
82 verbose stack dependencies":{"glob":"^4.4.2"},"bin":{"rimraf":"./bin.js"},"director
82 verbose stack                                                                      ^
82 verbose stack     at Object.parseJSON        (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/parse.js:745:13)
82 verbose stack     at parse (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/index.js:10:13)
82 verbose stack     at consumeBody.call.then.buffer (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/body.js:96:50)
82 verbose stack     at <anonymous>
82 verbose stack     at process._tickCallback (internal/process/next_tick.js:188:7)
83 verbose cwd /Users/mourui/.Trash
84 verbose Darwin 16.4.0
85 verbose argv "/usr/local/Cellar/node/8.2.1/bin/node" "/usr/local/bin/npm" "install" "-g" "yarn" "react-native-cli"
86 verbose node v8.2.1
87 verbose npm  v5.3.0
88 error Unexpected end of input at 1:10970
88 error dependencies":{"glob":"^4.4.2"},"bin":{"rimraf":"./bin.js"},"director
88 error                                                                      ^
89 verbose exit [ 1, true ]

参考链接

相关文章

  • React-Native 常用命令

    react-native插件 1.安装 npm install -g yarn reac t-native-cli...

  • rn基础教程

    基础环境 安装node. 安装react-native命令行工具npm install -g yarn react...

  • React 学习之旅

    react 安装 先安装node ,npm npm install yarn -g npm install-g c...

  • yarn使用

    安装 npm install -g yarn

  • yarn常用命令 2019

    通过npm安装yarn npm install -g yarn 安装包 yarn add [...] 全局安装 y...

  • 前端常用工具安装命令

    npm install vuenpm install vue-router npm i -g yarn //cnp...

  • npm 和yarn命令的不同

    安装 npm 是node自带 yarn的安装并查看版本: npm install -g yarn yarn --v...

  • 常用

    1、 npm install -g yarn 安装yarn 2、./gradlew assembleRelease...

  • VUE3.0总结

    yarn的安装 安装yarn npm install -g yarn 查看安装版本 yarn --version ...

  • vue-cli

    ## yarn安装 npm install -g yarn ## yarn使用 安装全部的包 yarn 安装某个包...

网友评论

      本文标题:npm install -g yarn react-native

      本文链接:https://www.haomeiwen.com/subject/xyrbkxtx.html