reactjs - 新机器上的“react-scripts start”错误
问题描述
我用“创建反应应用程序”制作了一个项目(在 macos 上)并在 git 上提交。
现在我正在 Windows 上克隆该文件夹,并按照通常的步骤进行操作:
节点 npm npm 安装
无论如何,我有这个问题:
$ npm start
> name@0.1.0 start \\Mac\Home\Desktop\WindowsProgetti\WebApp
> react-scripts start
'\\Mac\Home\Desktop\WindowsProgetti\WebApp'
CMD.EXE è stato avviato utilizzando il percorso precedente come directory
corrente. I percorsi UNC non sono supportati. Per impostazione predefinita,
verrà utilizzata la directory di Windows.
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module '\\Mac\Home\Desktop\WindowsProgetti\WebApp\node_modules\react-scripts\bin\react-scripts.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:279:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:752:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! name@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the matchplat@0.1.0 start 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! C:\Users\fabio\AppData\Roaming\npm-cache\_logs\2018-09-21T13_56_21_061Z-debug.log
(我知道......有些东西是意大利语,最重要的是英语。)
包.json
{
"name": "name",
"version": "0.1.0",
"private": true,
"homepage": "http://localhost:3000",
"dependencies": {
"@material-ui/core": "^3.0.0",
"@material-ui/icons": "^3.0.0",
"create-react-app": "^1.5.2",
"react": "^16.4.2",
"react-dom": "^16.4.2",
"react-intl": "^2.4.0",
"react-loadable": "^5.5.0",
"react-router-dom": "^4.3.1",
"react-scripts": "1.1.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
在网络和堆栈上进行了大量研究......很多用户都遇到了这个问题,但他们的解决方案都不适合我。
有什么建议么?
非常感谢。
解决方案
解决方案:
使用 PARALLELS... 确保您的项目不在两个操作系统之间的“共享”空间上。
我一直无法执行 mac 文件夹中的项目。无法在共享空间上执行
仅在 Windows 空间上工作。
谢谢。
推荐阅读
- mongodb - 慢速数组 $push mongoDB 查询
- python - Concourse 流水线:如何让嵌入式脚本使流水线失败
- python - 基于两个数据帧匹配交易的发送者和接收者
- react-native - 为什么使用自定义 useRef 挂钩对我不起作用?
- ruby - Ruby 数据库连接多次返回相同的记录
- c# - 我可以从哪里下载证书以便将应用程序从 Visual Studio 发布到 Azure
- r - 使用 sGARCH 时如何获得平均方程的系数?
- python - 将 2 个系列的索引混合到 1 个数据帧中
- ruby-on-rails - Rails rake 任务在生产中失败:“NoMethodError:私有方法 `open' 调用 URI:Module”
- python - 在 cygwin 中创建指向 python 脚本的符号链接