bootstrap-loader: Something to do with Resolve@1.7.0 which released yesterday. Cannot find module '.....\node_modules\bootstrap-sass\package.json\package.json'
Since yesterday’s release of Resolve@1.7.0
resolveModule.js returns the ....\node_modules\bootstrap-sass\package.json instead of ....\node_modules\bootstrap-sass\
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 15
- Comments: 17 (1 by maintainers)
I added this to my package.json for now (we use Yarn):
... "resolutions": { "**/bootstrap-loader/resolve": "1.6.0" }, ...I basically hardcode the version number of ‘resolve’
npm install resolve@1.4.0 --save-devin my project, and it works.I’m worked in a workaround: https://stackoverflow.com/questions/49781999/deployment-error-looking-for-package-json-in-a-folder-named-package-json/49787040#49787040.
It’s dirty but lets keep working
I found the problem:
bootstrap-loader/src/utils/checkBootstrapVersion.js
Line 14
From
const npmVersion = require(path.join(bootstrapPath, 'package.json')).version;To
const npmVersion = require(path.join(bootstrapPath)).version;Explanation the var bootstrapPath include the “package.json”
checkBootstrapVersion.js.zip
@justin808 There is a PR ready 😃
Have the same issue.
Used @michaelwalloschke 's solution and it works great.