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)

Most upvoted comments

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-dev in my project, and it works.

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.