bootstrap-loader: Cannot find module './lib/bootstrap.loader!./no-op.js' when using on server

When using bootstrap loader on a server getting the following error:

Error: Cannot find module './lib/bootstrap.loader!./no-op.js'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (d:\projects\react-dashboard\node_modules\bootstrap-loader\loader.js:1:1)
    at Module._compile (module.js:398:26)
    at Object.Module._extensions..js (module.js:405:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)

Adding bootstrap-loader to an entry point does not work:

entry: ['bootstrap-loader', './src/client.js'],

Refs: https://github.com/kriasoft/react-starter-kit/issues/179

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 65 (31 by maintainers)

Most upvoted comments

Having the same problem and still giving me the same error ERROR in ./node_modules/bootstrap-loader/no-op.js

Same error Node Version: 6.10.2 Webpack Version: 2.4.1

same here +1

I have this issue on node v4.2.6

@Judahmeek

yes I need this function to import modules on the server-side. I’m using the angular-universal-starter project. I’ve tried to debug the function. When I include the bootstrap-loader like:

  entry: ['bootstrap-loader', './src/client']

I got ‘bootstrap-loader’ as request param within checkNodeImport. I can check for this and do some different like for other modules? Any advice on that? e.g. return a file-path, basically to achieve the same loading-procedure like for the client.

@mxmtsk So it does. I’ll let you know once I have an answer for this.

I just wanted to follow up if anyone has made some progress? I’m using the latest node (but tried v5.12.0 too) and I’m getting

Error: Cannot find module './lib/bootstrap.loader!./no-op.js'

I’m using react-starter-kit and I can’t get my head around how to solve the error on server side.

I know, still same.

npm install -save babel-polyfill

right?