Giter VIP home page Giter VIP logo

Comments (4)

yoihito avatar yoihito commented on May 26, 2024

Hey hey! I got the same issue.

ERROR in ./~/bootstrap-webpack/bootstrap-scripts.loader.js!./~/bootstrap-webpack/bootstrap.config.js
Module build failed: Error: Cannot find module '/home/yoihito/Work/learning_new_stuff/whiteboard/node_modules/react-hot-loader/index.js!/home/yoihito/Work/learning_new_stuff/whiteboard/node_modules/jsx-loader/index.js?harmony!/home/yoihito/Work/learning_new_stuff/whiteboard/node_modules/bootstrap-webpack/bootstrap.config.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.module.exports.pitch (/home/yoihito/Work/learning_new_stuff/whiteboard/node_modules/bootstrap-webpack/bootstrap-scripts.loader.js:20:16)
 @ ./~/bootstrap-webpack/index.js 4:0-52

from bootstrap-webpack.

gowravshekar avatar gowravshekar commented on May 26, 2024

It appears that your webpack config, as a global loaders defined for *.js files.

Using global settings(*.js) to apply loaders will affect bootstrap-webpack.
To overcome this, you can use the below options(1/2/combinations)

  1. Use exclude option of the module.loaders section of the config.
  2. Adjust the regex in test option of the module loaders to prevent matching all the js files to which the loaders are applied.

To give an example, use .config.js for all your config files and and use the regex /^((?!.config.).).js$/ to prevent parsing of config files in the global test settings.
The provided regex doesn't match any files of the pattern *.config.js but matches rest of *.js.

See the explanation of different module options under module.loaders
http://webpack.github.io/docs/configuration.html

from bootstrap-webpack.

cef62 avatar cef62 commented on May 26, 2024

I've also the same error:

ERROR in ./~/bootstrap-webpack/bootstrap-scripts.loader.js!./~/bootstrap-webpack/bootstrap.config.js
Module build failed: Error: Cannot find module '/Users/matteo/unshift/repos/locals/playground/react/simple-app/node_modules/babel-loader/index.js?{"modules":"common"}!/Users/matteo/unshift/repos/locals/playground/react/simple-app/node_modules/bootstrap-webpack/bootstrap.config.js'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.module.exports.pitch (/Users/matteo/unshift/repos/locals/playground/react/simple-app/node_modules/bootstrap-webpack/bootstrap-scripts.loader.js:20:16)
 @ ./~/bootstrap-webpack/index.js 4:0-52

I'm using webpack 1.9.11 and react-bootstrap 0.23.0

from bootstrap-webpack.

lucygeneric avatar lucygeneric commented on May 26, 2024

thanks @gowravshekar

I had to slightly adjust my regex, below is my working loaders if it helps anyone

module: {
    loaders: [
      {test: /bootstrap\/js\//, loader: 'imports?jQuery=jquery' },
      {test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,   loader: "url?limit=10000&mimetype=application/font-woff" },
      {test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,    loader: "url?limit=10000&mimetype=application/octet-stream" },
      {test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,    loader: "file" },
      {test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,    loader: "url?limit=10000&mimetype=image/svg+xml" },
      {test: /^((?!config).)*\.js?$/, exclude: /node_modules/, loader: 'babel?cacheDirectory'}
    ]
  }

from bootstrap-webpack.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.