npm run build выдает ошибку: удаление недоступного кода - PullRequest
0 голосов
/ 03 ноября 2018

Я разработал nodeJS (проект webpack реагировать на js) в прошлом году. Теперь мне нужно запустить этот проект. Это по тому же пути, тот же код ...

npm install command

выдает это предупреждение, но это всего лишь предупреждение, я думаю, что это не проблема

npm WARN package.json react-seed@0.0.13 No license field.

после npm build введите команду npm start или npm start build но это дает ниже

   Dropping unreachable code [../~/react/lib/ReactCompositeComponent.js:350,0]
Declarations in unreachable code! [../~/react/lib/ReactCompositeComponent.js:351,0]
Dropping unused variable Component [../~/react/lib/ReactCompositeComponent.js:351,0]
Condition always false [../~/react/lib/ReactCompositeComponent.js:377,0]
Condition always false [../~/react/lib/ReactCompositeComponent.js:390,0]
Dropping side-effect-free statement [../~/react/lib/ReactCompositeComponent.js:390,0]
Condition always false [../~/react/lib/ReactCompositeComponent.js:392,0]
Dropping side-effect-free statement [../~/react/lib/ReactCompositeComponent.js:392,0]
Side effects in initialization of unused variable addendum [../~/react/lib/ReactCompositeComponent.js:386,0]
Condition always false [../~/react/lib/ReactCompositeComponent.js:466,0]
Dropping unreachable code [../~/react/lib/ReactCompositeComponent.js:467,0]
Condition always false [../~/react/lib/ReactCompositeComponent.js:588,0]
Dropping unreachable code [../~/react/lib/ReactCompositeComponent.js:590,0]
Condition always false [../~/react/lib/ReactCompositeComponent.js:613,0]
Condition always false [../~/react/lib/ReactCompositeComponent.js:627,0]
Condition always false [../~/react/lib/ReactCompositeComponent.js:629,0]
Dropping unreachable code [../~/react/lib/ReactCompositeComponent.js:629,0]
Declarations in unreachable code! [../~/react/lib/ReactCompositeComponent.js:630,0]
Dropping unused variable componentName [../~/react/lib/ReactCompositeComponent.js:630,0]
Side effects in initialization of unused variable ReactPropTypeLocationNames [../~/react/lib/ReactCompositeComponent.js:20,0]
Side effects in initialization of unused variable warning [../~/react/lib/ReactCompositeComponent.js:28,0]
Condition always false [../~/react/lib/ReactDOMComponent.js:87,0]
Dropping unreachable code [../~/react/lib/ReactDOMComponent.js:87,0]
Declarations in unreachable code! [../~/react/lib/ReactDOMComponent.js:88,0]
Dropping unused variable component [../~/react/lib/ReactDOMComponent.js:88,0]
Condition always false [../~/react/lib/ReactDOMComponent.js:96,0]

Dropping unreachable code [../~/redux/lib/combineReducers.js:120,0]

Condition always false [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/DiscardMiniBoxArea/_DiscardMiniBoxArea.scss:10,0]
Dropping unreachable code [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/DiscardMiniBoxArea/_DiscardMiniBoxArea.scss:12,0]
Side effects in initialization of unused variable update [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/DiscardMiniBoxArea/_DiscardMiniBoxArea.scss:7,0]
Condition always false [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/FriendList/_FriendList.scss:10,0]

Dropping unreachable code [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyLobbyGames/_OkeyLobbyGames.scss:12,0]
Side effects in initialization of unused variable update [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyLobbyGames/_OkeyLobbyGames.scss:7,0]
Condition always false [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyLobby/_OkeyLobby.scss:10,0]

Dropping unreachable code [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyPlayerProfile/_OkeyPlayerProfile.scss:12,0]
Side effects in initialization of unused variable update [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyPlayerProfile/_OkeyPlayerProfile.scss:7,0]
Condition always false [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyPlayerSeat/_OkeyPlayerSeat.scss:10,0]
Dropping unreachable code [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyPlayerSeat/_OkeyPlayerSeat.scss:12,0]
Side effects in initialization of unused variable update [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyPlayerSeat/_OkeyPlayerSeat.scss:7,0]
Condition always false [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyPlayerSouth/_OkeyPlayerSouth.scss:10,0]
Dropping unreachable code [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyPlayerSouth/_OkeyPlayerSouth.scss:12,0]
Side effects in initialization of unused variable update [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyPlayerSouth/_OkeyPlayerSouth.scss:7,0]
Condition always false [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyPlayerWest/_OkeyPlayerWest.scss:10,0]
Dropping unreachable code [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyPlayerWest/_OkeyPlayerWest.scss:12,0]
Side effects in initialization of unused variable update [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyPlayerWest/_OkeyPlayerWest.scss:7,0]
Condition always false [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyPlayer/_OkeyPlayer.scss:10,0]
Dropping unreachable code [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyPlayer/_OkeyPlayer.scss:12,0]
Side effects in initialization of unused variable update [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyPlayer/_OkeyPlayer.scss:7,0]
Condition always false [../~/style-loader!../~/css-loader?sourceMap!../~/postcss-loader!../~/sass-loader?sourceMap&outputStyle=expanded&includePaths[]=c:/TFS/rc1/app/scss&includePaths[]=c:/TFS/rc1/~/compass-mixins/lib&sourceMap&sourceMapContents=true!./components/OkeyRack/_OkeyRack.scss:10,0]

Dropping unused variable isValidElement [../~/react-redux/~/prop-types/index.js:16,0]
Dropping unused variable throwOnDirectAccess [../~/react-redux/~/prop-types/index.js:24,0]
webpack: Compiled with warnings.

вот package.json

{
  "name": "react-seed",
  "version": "0.0.13",
  "description": "Seed project for React apps using ES6 & webpack.",
  "repository": "https://github.com/badsyntax/react-seed",
  "config": {
    "buildDir": "./build",
    "buildDirTests": "./build_tests",
    "devHost": "0.0.0.0",
    "devPort": 8000,
    "remoteHost": "http://evduzen.net"
  },
  "scripts": {
    "build": "set NODE_ENV=production&& npm run webpack",
    "clean": "rimraf $npm_package_config_buildDir && mkdir $npm_package_config_buildDir",
    "env": "env",
    "lint": "eslint --ext .js --ext .jsx ./app ./webpack && echo No linting errors.",
    "prebuild": "npm run clean",
    "pretest": "npm install && npm run lint",
    "pretest-travis": "npm install && npm run lint",
    "start": "set NODE_ENV=development && node dev-server ./webpack/config",
    "test": "NODE_ENV=test karma start --single-run",
    "test-dev": "NODE_ENV=test karma start",
    "test-travis": "NODE_ENV=test karma start --single-run",
    "webpack": "webpack --colors --progress --config ./webpack/config"
  },
  "dependencies": {
    "classnames": "^2.1.1",
    "hammerjs": "^2.0.4",
    "immutable": "^3.7.6",
    "intl": "^1.0.0",
    "intl-locales-supported": "^1.0.0",
    "jquery": "^2.1.4",
    "lodash": "^4.9.0",
    "materialize-css": "^0.97.5",
    "ms-signalr-client": "^2.2.2",
    "normalize.css": "^4.0.0",
    "react": "^0.14.8",
    "react-adsense": "0.0.3",
    "react-dnd": "^2.1.4",
    "react-dnd-html5-backend": "^2.4.1",
    "react-dnd-html5-touch-backend": "^1.5.0",
    "react-dnd-touch-backend": "^0.2.7",
    "react-dom": "^0.14.8",
    "react-flexgrid": "^0.7.0",
    "react-intl": "^2.0.0-rc-1",
    "react-redux": "^4.4.1",
    "redux": "^3.3.1",
    "redux-thunk": "^2.0.1",
    "superagent": "^1.3.0"
  },
  "devDependencies": {
    "autoprefixer": "^6.3.4",
    "babel-core": "^6.7.4",
    "babel-eslint": "^6.0.0",
    "babel-loader": "^6.2.4",
    "babel-plugin-rewire": "^1.0.0-rc-1",
    "babel-plugin-transform-decorators": "^6.6.5",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-polyfill": "^6.7.4",
    "babel-preset-es2015": "^6.6.0",
    "babel-preset-react": "^6.5.0",
    "babel-preset-stage-0": "^6.5.0",
    "babel-runtime": "^6.6.1",
    "chai": "^2.3.0",
    "compass-mixins": "^0.12.7",
    "css-loader": "^0.23.1",
    "eslint": "^2.5.1",
    "eslint-plugin-react": "^4.2.3",
    "expose-loader": "^0.7.0",
    "extract-text-webpack-plugin": "^1.0.1",
    "file-loader": "^0.8.1",
    "glob": "^7.0.3",
    "html-loader": "^0.4.3",
    "inline-environment-variables-webpack-plugin": "^1.1.0",
    "json-loader": "^0.5.1",
    "karma": "^0.12.31",
    "karma-chrome-launcher": "^0.1.12",
    "karma-cli": "0.0.4",
    "karma-mocha": "^0.1.10",
    "karma-mocha-reporter": "^1.0.2",
    "karma-phantomjs-launcher": "^0.1.4",
    "karma-sinon": "^1.0.4",
    "karma-source-map-support": "^1.0.0",
    "karma-sourcemap-loader": "^0.3.4",
    "karma-webpack": "^1.5.1",
    "mocha": "^2.2.4",
    "mocha-loader": "^0.7.1",
    "node-libs-browser": "^1.0.0",
    "node-sass": "^3.4.2",
    "postcss-loader": "^0.8.2",
    "react-hot-loader": "^1.2.7",
    "rimraf": "^2.3.3",
    "sass-loader": "^3.2.0",
    "sinon": "^1.14.1",
    "source-map-support": "^0.4.0",
    "style-loader": "^0.13.1",
    "template-html-loader": "0.0.3",
    "webpack": "^1.12.14",
    "webpack-dev-server": "^1.8.2"
  },
  "engines": {
    "node": ">=0.10.0"
  },
  "eslintConfig": {
    "env": {
      "browser": true,
      "node": true,
      "es6": true
    },
    "ecmaFeatures": {
      "modules": true,
      "jsx": true
    },
    "globals": {
      "describe": true,
      "it": true,
      "xit": true,
      "xdescribe": true,
      "beforeEach": true,
      "sinon": true
    },
    "plugins": [
      "react"
    ],
    "parser": "babel-eslint",
    "rules": {
      "strict": true,
      "indent": [
        2,
        2
      ],
      "quotes": [
        2,
        "single"
      ],
      "new-cap": 0,
      "no-unused-expressions": 0,
      "no-underscore-dangle": 0,
      "react/display-name": 0,
      "react/jsx-quotes": 1,
      "react/jsx-no-undef": 1,
      "react/jsx-sort-props": 1,
      "react/jsx-uses-react": 1,
      "react/jsx-uses-vars": 1,
      "react/no-did-mount-set-state": 1,
      "react/no-did-update-set-state": 1,
      "react/no-multi-comp": 1,
      "react/no-unknown-property": 1,
      "react/prop-types": 1,
      "react/react-in-jsx-scope": 1,
      "react/self-closing-comp": 1,
      "react/wrap-multilines": 1
    }
  }
}

в чем проблема? У меня есть много плагинов, я должен обновить их? Есть ли команды для обновления всех проектов?

Или как мне справиться с этой ошибкой? Мой компьютер такой же, я не форматировал компьютер. В том же компьютере он работал в прошлом году, теперь выдает ошибку.

...