简体   繁体   中英

“react-scripts start” error on new machine

I made a project ( on macos ) with "create react app" and committed on git.

Now I'm cloning the folder on Windows and I'm following usual steps:

node npm npm install

Anyway I'm having this issue back:

 $ 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

(I know... something is in Italian language, most important stuff is English anyway.)

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

Did lot of research on the web and on stack... lots of user having this issue but none of their solution worked for me.

Any suggestions?

Thanks a lot.

Solution:

Using PARALLELS... be sure that your project is not on on "shared" space between the two OS.

I've been not able to execute the project in the mac folder. Been not able to execute on shared space

Worked on Windows Only space.

Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM