Задать вопрос
PolyakhAleksandr
@PolyakhAleksandr

Ошибка в сборке create react app(webpack) (Module not found: Error: Can't resolve '[object Object]' in ...) как исправить?

Взял готовую сборку:
https://github.com/facebookincubator/create-react-app
При разработке всё работает.
Ниже будет описана ошибка и мой package.json
Когда пытаюсь собрать сборку 'npm run build' получаю ошибку:
Creating an optimized production build...
(node:8720) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/
56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
Failed to compile.

Module not found: Error: Can't resolve '[object Object]' in 'C:\Projects\login_static'

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! template@0.1.0 build: `npm run build-css && react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the template@0.1.0 build 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\Polyakh\AppData\Roaming\npm-cache\_logs\2017-08-02T10_40_53_536Z-debug.log

package.json:
{
"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": "^7.2.3",
"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"
}
}
  • Вопрос задан
  • 1451 просмотр
Подписаться 1 Оценить Комментировать
Пригласить эксперта
Ответы на вопрос 1
@popuguytheparrot
Заюзай лучше вот эту сборку
https://github.com/KleoPetroff/react-webpack-boile...
У тебя не получается самостоятельно прикрутить
Ответ написан
Ваш ответ на вопрос

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

Похожие вопросы