npm err ( create-react-app 出错了)!! 大爷快来啊

发布于 2022-09-06 04:09:43 字数 2984 浏览 23 评论 0

全局安装create-react-app后,创建项目出的错,之前想怎么玩怎么玩,现在懵逼了,node重装了也没用,create-react-app卸了重新全局安装也没用,日志也看不出所以然

报错

clipboard.png

日志部分相关信息

720 silly pacote range manifest for babel-plugin-transform-es2015-parameters@^6.23.0 fetched in 219ms
721 silly resolveWithNewModule babel-plugin-transform-es2015-parameters@6.24.1 checking installable status
722 http fetch GET 304 https://registry.npm.taobao.org/babel-plugin-transform-es2015-unicode-regex 125ms (from cache)
723 silly pacote range manifest for babel-plugin-transform-es2015-unicode-regex@^6.22.0 fetched in 125ms
724 silly resolveWithNewModule babel-plugin-transform-es2015-unicode-regex@6.24.1 checking installable status
725 http fetch GET 304 https://registry.npm.taobao.org/babel-plugin-transform-es2015-modules-umd 234ms (from cache)
726 silly pacote range manifest for babel-plugin-transform-es2015-modules-umd@^6.23.0 fetched in 234ms
727 silly resolveWithNewModule babel-plugin-transform-es2015-modules-umd@6.24.1 checking installable status
728 http fetch GET 304 https://registry.npm.taobao.org/babel-plugin-transform-es2015-template-literals 219ms (from cache)
729 silly pacote range manifest for babel-plugin-transform-es2015-template-literals@^6.22.0 fetched in 219ms
730 silly resolveWithNewModule babel-plugin-transform-es2015-template-literals@6.22.0 checking installable status
731 http fetch GET 304 https://registry.npm.taobao.org/babel-plugin-transform-exponentiation-operator 140ms (from cache)
732 silly pacote range manifest for babel-plugin-transform-exponentiation-operator@^6.22.0 fetched in 140ms
733 silly resolveWithNewModule babel-plugin-transform-exponentiation-operator@6.24.1 checking installable status
734 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...76da68880d4cebeffd","'
734 verbose stack     at JSON.parse (<anonymous>)
734 verbose stack     at parseJson (D:\Apps\nodejs\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\node_modules\json-parse-better-errors\index.js:7:17)
734 verbose stack     at consumeBody.call.then.buffer (D:\Apps\nodejs\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\body.js:96:50)
734 verbose stack     at <anonymous>
734 verbose stack     at process._tickCallback (internal/process/next_tick.js:188:7)
735 verbose cwd D:\xx1
736 verbose Windows_NT 10.0.14393
737 verbose argv "D:\\Apps\\nodejs\\node.exe" "D:\\Apps\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "--save-exact" "--loglevel" "error" "react" "react-dom" "react-scripts"
738 verbose node v8.9.1
739 verbose npm  v5.5.1
740 error Unexpected end of JSON input while parsing near '...76da68880d4cebeffd","'
741 verbose exit [ 1, true ]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鹊巢 2022-09-13 04:09:43

设置npm代理,执行命令

npm config set registry http://registry.cnpmjs.org

然后重新create项目

create-react-app my-app
    ...
    Happy hacking!
//完成了...

之前用的淘宝代理

npm config set registry https://registry.npm.taobao.org

装任何东西都ok,create-react-app也没问题,今天就突然挂掉了,只挂这一个啊,换回来居然就好了,无语!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文