codebandits / react-app-rewire-css-modules

MIT License
69 stars 51 forks source link

Package is deleted on every npm install #14

Closed k1sul1 closed 5 years ago

k1sul1 commented 6 years ago

Every time I install a package using npm install [package] this gets removed.

$ npm install react-app-rewire-css-modules --only=dev
npm WARN eslint-config-standard@11.0.0 requires a peer of eslint@>=4.18.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-import@2.13.0 requires a peer of eslint@2.x - 5.x but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-jsx-a11y@6.1.0 requires a peer of eslint@^3 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-node@6.0.1 requires a peer of eslint@>=3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react@7.10.0 requires a peer of eslint@^3.0.0 || ^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-standard@3.1.0 requires a peer of eslint@>=3.19.0 but none is installed. You must install peer dependencies yourself.
npm WARN extract-text-webpack-plugin@3.0.2 requires a peer of webpack@^3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN kea@0.28.2 requires a peer of redux@3.x but none is installed. You must install peer dependencies yourself.
npm WARN react-app-rewire-css-modules@1.0.0 requires a peer of sass-loader@^6.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN react-app-rewire-mobx@1.0.8 requires a peer of mobx@>=3.1.17 < 5 but none is installed. You must install peer dependencies yourself.
npm WARN react-app-rewire-mobx@1.0.8 requires a peer of mobx-react@>=4.2.2 < 6 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@7.0.3 requires a peer of webpack@^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ react-app-rewire-css-modules@1.0.0
updated 1 package in 9.455s
$ npm install lodash
npm WARN eslint-config-standard@11.0.0 requires a peer of eslint@>=4.18.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-import@2.13.0 requires a peer of eslint@2.x - 5.x but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-jsx-a11y@6.1.0 requires a peer of eslint@^3 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-node@6.0.1 requires a peer of eslint@>=3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react@7.10.0 requires a peer of eslint@^3.0.0 || ^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-standard@3.1.0 requires a peer of eslint@>=3.19.0 but none is installed. You must install peer dependencies yourself.
npm WARN extract-text-webpack-plugin@3.0.2 requires a peer of webpack@^3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN kea@0.28.2 requires a peer of redux@3.x but none is installed. You must install peer dependencies yourself.
npm WARN react-app-rewire-mobx@1.0.8 requires a peer of mobx@>=3.1.17 < 5 but none is installed. You must install peer dependencies yourself.
npm WARN react-app-rewire-mobx@1.0.8 requires a peer of mobx-react@>=4.2.2 < 6 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@7.0.3 requires a peer of webpack@^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ lodash@4.17.10
removed 1 package and updated 1 package in 8.346s
$ npm run start

> frontend@0.1.0 start /xxx
> react-app-rewired start

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

Error: Cannot find module 'react-app-rewire-css-modules'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
    at Function.Module._load (internal/modules/cjs/loader.js:475:25)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)
    at Object.<anonymous> (/home/k1sul1/projects/order66/frontend/config-overrides.js:2:19)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frontend@0.1.0 start: `react-app-rewired start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frontend@0.1.0 start script.

I've no idea why. This doesn't happen in other projects I'm working on. I checked the package's package.json for any scripts that might cause this, but nope, couldn't find any.

My package.json:

{
  "name": "xxx",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "lodash": "^4.17.10",
    "react": "^16.4.1",
    "react-dom": "^16.4.1",
    "react-redux": "^5.0.7",
    "react-router-dom": "^4.3.1",
    "react-router-redux": "^5.0.0-alpha.9",
    "react-scripts": "^1.1",
    "react-transition-group": "^2.4.0",
    "redux": "^4.0.0",
    "redux-saga": "^0.16.0",
    "reselect": "^3.0.1"
  },
  "scripts": {
    "start": "react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewrired --env=jsdom",
    "eject": "react-app-rewrired eject",
    "postinstall": "npm install react-app-rewire-css-modules --ignore-scripts"
  },
  "browserslist": {
    "development": [
      "last 2 chrome versions",
      "last 2 firefox versions",
      "last 2 edge versions"
    ],
    "production": [
      ">0.25%",
      "not op_mini all",
      "ie 11"
    ]
  },
  "devDependencies": {
    "babel-eslint": "^8.2.5",
    "babel-plugin-transform-decorators": "^6.24.1",
    "babel-plugin-transform-decorators-legacy": "^1.3.5",
    "eslint-config-standard": "^11.0.0",
    "eslint-plugin-import": "^2.13.0",
    "eslint-plugin-jsx-a11y": "^6.1.0",
    "eslint-plugin-node": "^6.0.1",
    "eslint-plugin-promise": "^3.8.0",
    "eslint-plugin-react": "^7.10.0",
    "eslint-plugin-standard": "^3.1.0",
    "node-sass": "^4.9.1",
    "react-app-rewire-css-modules": "github:codebandits/react-app-rewire-css-modules",
    "react-app-rewire-mobx": "^1.0.8",
    "react-app-rewire-scss": "^1.0.2",
    "react-app-rewired": "^1.5.2",
    "sass-loader": "^7.0.3"
  }
}
k1sul1 commented 6 years ago

This is obviously more annoying than a real problem. Also happens after nuking node_modules.

https://github.com/npm/npm/issues/17929 https://github.com/npm/npm/issues/17379

Found similar issues, but in my case it's just this one package.

lnhrdt commented 5 years ago

Closing this issue and archiving this project in favor of Create React App's native support for CSS Modules introduced in v2.