ket*_*tim 5 node.js npm github-pages reactjs
我找到了一堆有些相关的答案,但到目前为止似乎无法修复......
对 React 有点陌生(而且我很累),所以没有任何线索 - 我使用 create-react-app 创建了一个新的 React 应用程序,然后在 package.json 中添加了 Github Pages位。
就npm run build编译失败了。错误如下。我尝试过的事情:
> react-scripts build
Creating an optimized production build...
Failed to compile.
Module not found: Error: Can't resolve 'react' in '/Users/Mac/Sites/cintacks/src'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cintacks@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cintacks@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Mac/.npm/_logs/2017-06-14T19_52_07_541Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cintacks@0.1.0 predeploy: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cintacks@0.1.0 predeploy script
Run Code Online (Sandbox Code Playgroud)
鉴于目前的情况,我会尝试:
/Users/Mac/.npm/_logs/2017-06-14T19_52_07_541Z-debug.logcreate-react-appnpm start和/或npm run build不添加 GitHub 页面位还:
npm run deploy?/Users/Mac/Sites/cintacks/src。react里面有一个叫的文件夹吗?| 归档时间: |
|
| 查看次数: |
13794 次 |
| 最近记录: |