DeloitteDigitalUK / react-redux-starter-app

Starter app with React, Redux, Webpack, CSS Modules, API calls etc.
MIT License
16 stars 0 forks source link

Update to Bootstrap alpha v4 (+ latest loader v1?) #21

Open michael-martin opened 8 years ago

michael-martin commented 8 years ago

Issue: Updated to Bootstrap alpha v3, and received error:

resolveModule error is  Error: Cannot find module 'bootstrap' from '/Users/mimartin/Documents/projects/react-redux-starter-app/node_modules/bootstrap-loader/lib/utils'

This was caused by an issue in Boostrap v3: https://github.com/twbs/bootstrap/issues/20383

That fix looks imminent (17/20 issues assigned to v4 are sorted)

The Bootstrap Loader ticket tracking this can be seen here: https://github.com/shakacode/bootstrap-loader/issues/112

Reverting to Bootstrap 4 alpha 2 in the meantime.

michael-martin commented 8 years ago

NB @victoriasloan @girwin575 @vitkon - Reverting back to alpha 2 until the linked issues are sorted.

borysn commented 8 years ago

@michael-martin reverting back to alpha v2 doesn't resolve the issue

michael-martin commented 8 years ago

@borysn It should have. I've taken another clean copy to be sure, it's all working here.

What version of Node are you running? Can you delete your whole node_modules folder and re-run npm install?

borysn commented 8 years ago

@michael-martin currently trying with node 6.4.0 and 4.3.1 (system, and gradle build version). I'm also attempting this with the loader v2, but I did try rolling back last week only to find the same issue. I've been deleting, cleaning, but got nothing here.

I keep hearing that bootstrap-loader is fine in some cases, so may not be a problem with the package, but for the life of me, I just can't figure out what's going on.

repo for reference in case you have the time, and maybe something obvious jumps out at you. You can ignore gradle.

michael-martin commented 8 years ago

@borysn Ah your package.json is still going to install Bootstrap alpha 3.

"bootstrap": "^4.0.0-alpha.2",

The ^ installs the latest available minor version of the given package, not the specific one listed in your package.json.

To fix it, just remove the qualifier and run npm install again (Shouldn't need to manually delete anything first, but if it fails, delete the Bootstrap folder in node_modules)

"bootstrap": "4.0.0-alpha.2",

borysn commented 8 years ago

@michael-martin that did it! Wow, I feel like a derp right now. I even read through those remarks on the previous threads revolving around the issue. I just misunderstood that npm install would upgrade. For some reason I got under the impression that only something like ncu would alter the version.

thank you (:

michael-martin commented 8 years ago

@borysn No problem, glad to hear you're all sorted! It's one of those quirks you never think twice about until it hits you with a PITA bug like this! :D