saguijs / sagui

:monkey: Front-end tooling in a single dependency
http://sagui.js.org/
MIT License
669 stars 32 forks source link

Missing ESlint modules #397

Closed roschaefer closed 6 years ago

roschaefer commented 6 years ago

When I follow the "Quickstart in three steps" section of the README

  1. npm init
  2. npm install --save-dev sagui
  3. npm run

I see a lot of missing modules:

    ERROR in ./src/index.js
    Module build failed: Error: Failed to load plugin flowtype: Cannot find module 'eslint-plugin-flowtype'
    Referenced from: /home/robert/Development/React/sagui/urban-analytics-multiview-map-component/.eslintrc
        at Function.Module._resolveFilename (module.js:485:15)
        at Function.resolve (internal/module.js:18:19)
        at Plugins.load (/home/robert/Development/React/sagui/urban-analytics-multiview-map-component/node_modules/eslint/lib/config/plugins.js:133:29)
        at Array.forEach (native)
        at Plugins.loadAll (/home/robert/Development/React/sagui/urban-analytics-multiview-map-component/node_modules/eslint/lib/config/plugins.js:173:21)
        at loadFromDisk (/home/robert/Development/React/sagui/urban-analytics-multiview-map-component/node_modules/eslint/lib/config/config-file.js:536:35)
        at load (/home/robert/Development/React/sagui/urban-analytics-multiview-map-component/node_modules/eslint/lib/config/config-file.js:592:20)
        at configExtends.reduceRight (/home/robert/Development/React/sagui/urban-analytics-multiview-map-component/node_modules/eslint/lib/config/config-file.js:421:36)
        at Array.reduceRight (native)
        at applyExtends (/home/robert/Development/React/sagui/urban-analytics-multiview-map-component/node_modules/eslint/lib/config/config-file.js:403:28)
        at loadFromDisk (/home/robert/Development/React/sagui/urban-analytics-multiview-map-component/node_modules/eslint/lib/config/config-file.js:556:22)
        at Object.load (/home/robert/Development/React/sagui/urban-analytics-multiview-map-component/node_modules/eslint/lib/config/config-file.js:592:20)
        at Config.loadSpecificConfig (/home/robert/Development/React/sagui/urban-analytics-multiview-map-component/node_modules/eslint/lib/config.js:139:46)
        at new Config (/home/robert/Development/React/sagui/urban-analytics-multiview-map-component/node_modules/eslint/lib/config.js:101:14)
        at new CLIEngine (/home/robert/Development/React/sagui/urban-analytics-multiview-map-component/node_modules/eslint/lib/cli-engine.js:428:23)
        at Object.module.exports (/home/robert/Development/React/sagui/urban-analytics-multiview-map-component/node_modules/sagui/node_modules/eslint-loader/index.js:176:27)
     @ multi ./node_modules/sagui/node_modules/webpack-dev-server/client?http://141.89.217.218:3000 webpack/hot/dev-server ./index
    Child html-webpack-plugin for "index.html":
             Asset     Size  Chunks  Chunk Names
        index.html  26.6 kB       0
           [0] ./node_modules/sagui/node_modules/html-webpack-plugin/lib/loader.js!./src/index.html 298 bytes {0} [built]

I have to add these eslint modules as development dependencies until I can finally npm start:

  "devDependencies": {
    "eslint-config-prettier": "^2.3.0",
    "eslint-config-standard": "^10.2.1",
    "eslint-config-standard-jsx": "^4.0.2",
    "eslint-plugin-flowtype": "^2.35.0",
    "eslint-plugin-import": "^2.7.0",
    "eslint-plugin-prettier": "^2.1.2",
    "eslint-plugin-react": "^7.2.0",
    "eslint-plugin-standard": "^3.0.1",
    "eslint-plugin-node": "^5.1.1",
    "sagui": "^11.1.0"
  }

Is this just missing in the README or is it a bug?

$ node --version
v8.0.0
$ npm --version
5.2.0
$ cat /proc/version
Linux version 4.12.5-1-ARCH (builduser@tobias) (gcc version 7.1.1 20170630 (GCC) ) #1 SMP PREEMPT Fri Aug 11 12:40:21 CEST 2017
pirelenito commented 6 years ago

Thanks for reporting and sorry for the long time to reply.

That is very odd. I have pushed a PR (#401) that uses our testing infrastructure to validate that we can create a new Sagui project using a similar environment as yours and it worked fine.

$ node --version
v8.4.0

$ npm --version
5.3.0

You can see how the test is defined here and its successful execution in Travis.

I asked @xaviervia to also do a test in his local machine to see if we can get more information on this issue.

xaviervia commented 6 years ago

I run the same commands with node v8.0.0 and npm v5.0.0 and were unable to reproduce. Same in node v8.2.1 and npm v5.3.0 :( No idea what can be happening.

roschaefer commented 6 years ago

Well then, I'm going to close this as it is not possible to reproduce. In fact, I ended up configuring my own build process so I'm not using sagui anymore.