0

我有一个项目,我使用 npm 来处理依赖项。该项目与 Webpack 捆绑在一起,将在客户端上运行(它是为使用 gh-pages 进行托管而构建的),没有生产依赖项。因此我只有devDependencies在我的package.json. 但是,当我运行时,npm install什么都没有安装。当我运行npm install --dev我的依赖项时,它们会按预期安装。由于--dev不推荐使用,我也尝试过npm install --only=dev,但是也没有安装任何东西!我的(插入下面)有什么东西坏了,package.json还是我误解了 npm?

{
 "name": "Boilerplate",
 "version": "0.0.1",
 "description": "A boilerplate to quickly get started with an offline first React/Redux app",
 "repository": {
   "type": "git",
   "url": "https://github.com/OskarKlintrot/Offline-First-React-And-Redux-Boilerplate"
 },
 "scripts": {
   "start": "webpack-dev-server",
   "build": "webpack --progress --colors --production"
 },
 "private": true,
 "devDependencies": {
   "babel-core": "^6.2.1",
   "babel-eslint": "^4.0.5",
   "babel-loader": "^6.2.0",
   "babel-polyfill": "^6.2.0",
   "babel-preset-es2015": "^6.1.18",
   "babel-preset-react": "^6.1.18",
   "babel-preset-stage-1": "^6.1.18",
   "eslint": "^1.1.0",
   "eslint-loader": "^1.0.0",
   "eslint-plugin-react": "^3.13.1",
   "file-loader": "^0.8.5",
   "history": "^1.17.0",
   "react": "^0.14.2",
   "react-dom": "^0.14.2",
   "react-hot-loader": "^1.3.0",
   "react-mdl": "^1.0.2",
   "react-redux": "^4.0.4",
   "react-router": "^1.0.2",
   "react-tap-event-plugin": "^0.2.1",
   "redux": "^3.0.5",
   "redux-devtools": "^3.0.0",
   "redux-devtools-dock-monitor": "^1.0.1",
   "redux-devtools-log-monitor": "^1.0.1",
   "redux-history-transitions": "^1.0.0",
   "redux-thunk": "^1.0.2",
   "transfer-webpack-plugin": "^0.1.4",
   "webpack": "^1.12.9",
   "webpack-dev-server": "^1.14.0"
 }
}
4

0 回答 0