shisik
@shisik

Как исправить ошибки при подключении Bootstrap к react?

Привет, пытаюсь подключить Bootstrap 4 к достаточно старому проекту. При сборке получаю следующие ошибки

internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'react-router/lib/RouterUtils'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (C:\Webserver\ruz_vorderseite\node_modules\redux-router\lib\ReduxRouter.js:23:34)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Object.require.extensions.(anonymous function) [as .js] (C:\Webserver\ruz_vorderseite\node_modules\babel-register\lib\node.js:152:7)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! spbstu-schedule@1.0.0 start: `cd ./src && node server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the spbstu-schedule@1.0.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\alex\AppData\Roaming\npm-cache\_logs\2019-08-03T20_01_07_479Z-debug.log


Содержимое package.json следующее

{
  "name": "schedule",
  "version": "1.0.0",
  "description": "",
  "main": "src/index.js",
  "repository": "",
  "dependencies": {
    "bootstrap": "^4.3.1",
    "compression": "^1.7.4",
    "es6-shim": "^0.35.5",
    "express": "^4.17.1",
    "history": "^4.9.0",
    "ical-generator": "^1.7.2",
    "isomorphic-fetch": "^2.2.1",
    "jquery": "^3.4.1",
    "lodash": "^4.17.15",
    "moment": "^2.24.0",
    "moment-timezone": "^0.5.26",
    "phantomjs-prebuilt": "^2.1.16",
    "popper.js": "^1.15.0",
    "react": "^16.8.6",
    "react-dom": "^16.8.6",
    "react-redux": "^7.1.0",
    "react-router": "^5.0.1",
    "reactify": "^1.1.1",
    "redux": "^4.0.4",
    "redux-localstorage": "^0.4.1",
    "redux-router": "^2.1.2",
    "redux-thunk": "^2.3.0",
    "shell-quote": "^1.6.1",
    "temp": "^0.9.0"
  },
  "devDependencies": {
    "babel-preset-env": "^1.7.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "babel-register": "^6.26.0",
    "babelify": "^8.0.0",
    "browserify": "^16.3.0",
    "envify": "^4.1.0",
    "es6-promise": "^4.2.8",
    "gulp": "^4.0.2",
    "gulp-autoprefixer": "^6.1.0",
    "gulp-concat": "^2.6.1",
    "gulp-minify-css": "^1.2.4",
    "gulp-plumber": "^1.2.1",
    "gulp-rename": "^1.4.0",
    "gulp-stylus": "^2.7.0",
    "redux-devtools": "^3.5.0",
    "require-dir": "^1.2.0",
    "uglifyify": "^5.0.1",
    "vinyl-source-stream": "^2.0.0",
    "watchify": "^3.11.1"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build": "gulp",
    "start": "cd ./src && node server.js"
  },
  "author": "",
  "license": "ISC",
  "browserify": {
    "transform": [
      [
        "reactify",
        {
          "es6": true
        }
      ],
      "envify"
    ]
  }
}


Где может быть ошибка?
  • Вопрос задан
  • 50 просмотров
Пригласить эксперта
Ваш ответ на вопрос

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

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