PolyakhAleksandr
@PolyakhAleksandr

Ошибка в сборке create react app(webpack) (Cannot find module 'escope') как исправить?

Установил с официального сайта готовый template https://github.com/facebookincubator/create-react-app,
добавил свои зависимости. При первой установке когда в корне проекта пишем npm i, после запускаем сборку через npm start https://prnt.sc/g3c5bj (скриншот ошибки), если запустить второй раз npm i все работает.
В самом низу разместил полный код ошибки.
Приложу что у меня находиться в package.json:
ссылка на файл в codepen https://codepen.io/PolyakhAlex/pen/eEzxMM?editors=1010
{
"name": "template",
"version": "0.1.0",
"private": true,
"dependencies": {
"classnames": "^2.2.5",
"es6-promise": "^4.1.1",
"is_js": "^0.8.0",
"isomorphic-fetch": "^2.2.1",
"lodash": "^4.15.0",
"node-sass-chokidar": "0.0.3",
"npm-run-all": "^4.0.2",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-redux": "^5.0.5",
"react-router": "3.0.2",
"react-router-redux": "^4.0.8",
"react-scripts": "1.0.10",
"redux": "^3.6.0",
"redux-devtools-extension": "^2.13.1",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.2.0"
},
"scripts": {
"build-css": "node-sass-chokidar src/ -o src/",
"watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive",
"start-js": "react-scripts start",
"start": "npm-run-all -p watch-css start-js",
"build": "npm run build-css && react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"lint": "eslint ./src"
},
"devDependencies": {
"autoprefixer-loader": "^3.2.0",
"babel-core": "^6.13.2",
"babel-eslint": "^6.1.2",
"babel-loader": "^6.2.4",
"babel-plugin-transform-runtime": "^6.12.0",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.13.2",
"babel-preset-react": "^6.11.1",
"babel-preset-stage-0": "^6.5.0",
"css-loader": "^0.23.1",
"eslint": "^4.3.0",
"eslint-plugin-react": "^6.10.3",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"url-loader": "^0.5.7",
"react-i18next": "^4.7.0",
"i18next": "^7.1.1"
}
}

error
===========================================
Error: Cannot find module 'escope'
at Function.Module._resolveFilename (module.js:469:15)
at monkeypatch (C:\Projects\login_static\node_modules\babel-eslint\index.js:41:26)
at Object.exports.parse (C:\Projects\login_static\node_modules\babel-eslint\index.js:384:5)
at parse (C:\Projects\login_static\node_modules\eslint\lib\linter.js:673:23)
at Linter.verify (C:\Projects\login_static\node_modules\eslint\lib\linter.js:808:27)
at processText (C:\Projects\login_static\node_modules\eslint\lib\cli-engine.js:203:31)
at CLIEngine.executeOnText (C:\Projects\login_static\node_modules\eslint\lib\cli-engine.js:668:26)
at lint (C:\Projects\login_static\node_modules\eslint-loader\index.js:211:17)
at Object.module.exports (C:\Projects\login_static\node_modules\eslint-loader\index.js:206:21)
at LOADER_EXECUTION (C:\Projects\login_static\node_modules\loader-runner\lib\LoaderRunner.js:119:14)
at runSyncOrAsync (C:\Projects\login_static\node_modules\loader-runner\lib\LoaderRunner.js:120:4)
at iterateNormalLoaders (C:\Projects\login_static\node_modules\loader-runner\lib\LoaderRunner.js:229:2)
at Array. (C:\Projects\login_static\node_modules\loader-runner\lib\LoaderRunner.js:202:4)
at Storage.finished (C:\Projects\login_static\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:40:15)
at C:\Projects\login_static\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:77:9
at C:\Projects\login_static\node_modules\graceful-fs\graceful-fs.js:78:16

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start-js"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! template@0.1.0 start-js: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the template@0.1.0 start-js script 'react-scripts start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the template package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! react-scripts start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs template
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls template
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Projects\login_static\npm-debug.log
ERROR: "start-js" exited with 1.

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! template@0.1.0 start: `npm-run-all -p watch-css start-js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the template@0.1.0 start script 'npm-run-all -p watch-css start-js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the template package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm-run-all -p watch-css start-js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs template
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls template
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Projects\login_static\npm-debug.log
  • Вопрос задан
  • 1575 просмотров
Решения вопроса 1
@popuguytheparrot
Обновись до 7 версии babel т.к у тебя eslint 4.3.0 и ему нужен eslint-scope.
Также предлагаю обновить nodejs до 8 и npm до 5.3.0
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы