Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't start a cloned react app

Tags:

npm

reactjs

I just cloned a react app to my local computer from github, but when I go to run an npm start on it, I get this error:

   ➜  sweet-movie-app git:(master) npm start
internal/modules/cjs/loader.js:596
    throw err;
    ^

Error: Cannot find module '../lib/utils/unsupported.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
    at Function.Module._load (internal/modules/cjs/loader.js:520:25)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:145:3)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)

I am not sure if it is something that is missing globally, or if it is something wrong with the local repo or npm. Package.json

{
  "name": "sweet-movie-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "material-ui": "^0.20.0",
    "react": "^16.2.0",
    "react-bootstrap": "^0.32.0",
    "react-dom": "^16.2.0",
    "react-redux": "^5.0.6",
    "react-scripts": "1.1.0",
    "redux": "^3.7.2",
    "redux-logger": "^3.0.6",
    "redux-thunk": "^2.2.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}
like image 550
Everest Software LLC Avatar asked Dec 17 '22 22:12

Everest Software LLC


1 Answers

Once you cloned the git repository try to install all modules using npm install from the directory of your app to avoid these kind of issues.

like image 81
Vishnu Jayan Avatar answered Jan 28 '23 01:01

Vishnu Jayan