新计算机上"react-scripts start"错误



我用"create react app"做了一个项目(在macos上(,并在git上提交。

现在我正在 Windows 上克隆文件夹,并按照通常的步骤操作:

节点 新人掌 npm 安装

无论如何,我又遇到了这个问题:

$ npm start
> name@0.1.0 start \MacHomeDesktopWindowsProgettiWebApp
> react-scripts start
'\MacHomeDesktopWindowsProgettiWebApp'
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 '\MacHomeDesktopWindowsProgettiWebAppnode_modulesreact-scriptsbinreact-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:UsersfabioAppDataRoamingnpm-cache_logs2018-09-21T13_56_21_061Z-debug.log

(我知道...有些东西是意大利语,最重要的是英语。

Package.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"
}
}

在网络和堆栈上做了很多研究...很多用户都有这个问题,但他们的解决方案都不适合我。

有什么建议吗?

多谢。

解决方案:

使用并行...确保您的项目不在两个操作系统之间的"共享"空间上。

我一直无法在 mac 文件夹中执行该项目。 无法在共享空间上执行

只在窗户空间工作。

谢谢。

最新更新