shakacode/bootstrap-loader

ERROR in ./node_modules/bootstrap-loader/no-op.js

Closed this issue ยท 13 comments

I'm trying to run a simple project using ( sass css bootstrap typescript ) in webpack, but I am stuck with errors,
ERROR in ./node_modules/bootstrap-loader/no-op.js (./node_modules/bootstrap-loader/lib/bootstrap.scripts.loader.js?{"bootstrapVersion":3,"useCustomIconFontPath":false,"extractStyles":false,"styleLoaders":["style-loader","css-loader","sass-loader"],"styles":["mixins","normalize","print","glyphicons","scaffolding","type","code","grid","tables","forms","buttons","component-animations","dropdowns","button-groups","input-groups","navs","navbar","breadcrumbs","pagination","pager","labels","badges","jumbotron","thumbnails","alerts","progress-bars","media","list-group","panels","wells","responsive-embed","close","modals","tooltip","popovers","carousel","utilities","responsive-utilities"],"scripts":["transition","alert","button","carousel","collapse","dropdown","modal","tooltip","popover","scrollspy","tab","affix"],"configFilePath":"/projects/bootstrapwebpack/node_modules/bootstrap-loader/.bootstraprc-3-default","bootstrapPath":"/projects/bootstrapwebpack/node_modules/bootstrap-sass","bootstrapRelPath":"../bootstrap-sass"}!./node_modules/bootstrap-loader/no-op.js) Module not found: Error: Can't resolve 'imports-loader' in '/projects/bootstrapwebpack' @ ./node_modules/bootstrap-loader/no-op.js (./node_modules/bootstrap-loader/lib/bootstrap.scripts.loader.js?{"bootstrapVersion":3,"useCustomIconFontPath":false,"extractStyles":false,"styleLoaders":["style-loader","css-loader","sass-loader"],"styles":["mixins","normalize","print","glyphicons","scaffolding","type","code","grid","tables","forms","buttons","component-animations","dropdowns","button-groups","input-groups","navs","navbar","breadcrumbs","pagination","pager","labels","badges","jumbotron","thumbnails","alerts","progress-bars","media","list-group","panels","wells","responsive-embed","close","modals","tooltip","popovers","carousel","utilities","responsive-utilities"],"scripts":["transition","alert","button","carousel","collapse","dropdown","modal","tooltip","popover","scrollspy","tab","affix"],"configFilePath":"/projects/bootstrapwebpack/node_modules/bootstrap-loader/.bootstraprc-3-default","bootstrapPath":"/projects/bootstrapwebpack/node_modules/bootstrap-sass","bootstrapRelPath":"../bootstrap-sass"}!./node_modules/bootstrap-loader/no-op.js) 7:0-64 @ ./node_modules/bootstrap-loader/lib/bootstrap.loader.js!./node_modules/bootstrap-loader/no-op.js @ ./node_modules/bootstrap-loader/loader.js @ multi bootstrap-loader ./src/index.ts

*** in my config.webpack.js i have :

const path = require('path'); const webpack = require('webpack'); module.exports = { entry: [ 'bootstrap-loader', './src/index.ts',], module: { rules:[ { test: /\.css$/, use: [ 'style-loader', 'css-loader' ], }, { test: /\.js$/, exclude: /(node_modules|bower_components)/, use: { loader: 'babel-loader', options: { presets: ['env'] } } }, { test: /\.(gif|png|jpe?g|svg)$/i, use: [ 'file-loader', { loader: 'image-webpack-loader', options: { }, }, ], }, { test: /\.tsx?$/, use: 'ts-loader', exclude: /node_modules/ }, { test: /\.scss$/, use: ['style-loader', 'css-loader', 'sass-loader'], exclude: /node_modules/ }, // Boooootstrap { test: /bootstrap-sass\/assets\/javascripts\//, loader: 'imports-loader?jQuery=jquery' }, { test: /\.(woff2?|svg)$/, loader: 'url-loader?limit=10000' }, { test: /\.(ttf|eot)$/, loader: 'file-loader' }, ], }, output: { filename: 'main.js', path: path.resolve(__dirname, 'dist') } };

*** in my package.json i have

{ "name": "test", "version": "1.0.0", "main": "index.js", "license": "MIT", "scripts": { "dev": "webpack --mode development --watch ", "build": "webpack --progress -p --watch " }, "dependencies": { "autoprefixer": "^9.0.0", "babel-core": "^6.26.3", "babel-loader": "^7.1.5", "babel-preset-env": "^1.7.0", "bootstrap": "^4.1.2", "bootstrap-loader": "^3.0.0", "bootstrap-sass": "^3.3.7", "css-loader": "^1.0.0", "exports-loader": "^0.7.0", "file-loader": "^1.1.11", "image-webpack-loader": "^4.3.1", "jquery": "^3.3.1", "mini-css-extract-plugin": "^0.4.1", "node-sass": "^4.9.2", "popper.js": "^1.14.3", "postcss-loader": "^2.1.6", "resolve-url-loader": "^2.3.0", "sass-loader": "^7.0.3", "style-loader": "^0.21.0", "ts-loader": "^4.4.2", "typescript": "^2.9.2", "url-loader": "^1.0.1", "webpack": "^4.16.0", "webpack-cli": "^3.0.8" } }

ok i will see
thank you by the way :) .

A similar error, Please suggest some solution

ERROR in ./node_modules/bootstrap-loader/no-op.js (./node_modules/bootstrap-loader/lib/bootstrap.loader.js!./node_modules/bootstrap-loader/no-op.js)
Module build failed (from ./node_modules/bootstrap-loader/lib/bootstrap.loader.js):
Error: Config file cannot be parsed: E:\WORK\webpack.bootstraprc'
at parseConfigFile (E:\WORK\webpack\node_modules\bootstrap-loader\lib\bootstrap.config.js:57:11)
at readUserConfig (E:\WORK\webpack\node_modules\bootstrap-loader\lib\bootstrap.config.js:77:20)
at createConfig (E:\WORK\webpack\node_modules\bootstrap-loader\lib\bootstrap.config.js:138:25)
at Object.module.exports.pitch (E:\WORK\webpack\node_modules\bootstrap-loader\lib\bootstrap.loader.js:106:40)
@ ./node_modules/bootstrap-loader/loader.js 2:17-61
@ ./src/app.js
@ multi tether ./src/app.js

@hafidsmail and @manishankar08 Please do some debugging and let me know if you have a doc or code PR. If you really need consulting help, please get in touch.

Closing due to inactivity. Please request to reopen if you like.

@manishankar08 @justin808 Thank you guys :) .. the problem is solved

@hafidsmail I am getting same error. Could you help me? how did you resolve it?

+1

@hafidsmail can you comment on how you solved the issue?

+1

How was this issue resolved? I am having the same problem with importing bootstrap-loader.

+1 how is it solved?

Same problem, could someone post the solution?

Figured out a solution for anybody else finding this thread:

Just update your bootstrap-loader and all of its dependencies. You are most likely missing resolve-url-loader or don't have the correct version. Check out the official documentation for what else do you need to run bootstrap-loader: https://www.npmjs.com/package/bootstrap-loader

The dependencies could be... you know... added as dependencies of the actual package, wouldn't they? Otherwise a person like yours truly might just go and start deleting random dependencies in a project "because we don't use this anywhere I don't see". Just a side note...