jualoppaz/single-spa-login-example-with-npm-packages

Module not found: Error: Can't resolve 'style-loader'

WangShuXian6 opened this issue · 1 comments

on branch master

The project is not working properly and the following error message is reported in the run

ERROR in ./root-application.js
Module not found: Error: Can't resolve 'style-loader' in '/Users/wangshuxian/code/single-spa-login-example-with-npm-packages'
 @ ./root-application.js 7:0-46

ERROR in ./root-application.js
Module not found: Error: Can't resolve 'style-loader' in '/Users/wangshuxian/code/single-spa-login-example-with-npm-packages'
 @ ./root-application.js 6:0-42
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
    [./node_modules/html-webpack-plugin/lib/loader.js!./index.html] 668 bytes {0} [built]
    [./node_modules/lodash/lodash.js] 531 KiB {0} [built]
    [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {0} [built]
    [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
ℹ 「wdm」: Failed to compile.

So I tried to install the style-loader, and when I run it again, I get an error

ERROR in ./node_modules/bootstrap-vue/dist/bootstrap-vue.css
Module build failed (from ./node_modules/style-loader/dist/cjs.js):
TypeError: this.getOptions is not a function
    at Object.loader (/Users/wangshuxian/code/single-spa-login-example-with-npm-packages/node_modules/style-loader/dist/index.js:19:24)
 @ ./root-application.js 7:0-46

ERROR in ./node_modules/bootstrap/dist/css/bootstrap.css
Module build failed (from ./node_modules/style-loader/dist/cjs.js):
TypeError: this.getOptions is not a function
    at Object.loader (/Users/wangshuxian/code/single-spa-login-example-with-npm-packages/node_modules/style-loader/dist/index.js:19:24)
 @ ./root-application.js 6:0-42
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
    [./node_modules/html-webpack-plugin/lib/loader.js!./index.html] 668 bytes {0} [built]
    [./node_modules/lodash/lodash.js] 531 KiB {0} [built]
    [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {0} [built]
    [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
ℹ 「wdm」: Failed to compile.

This is all good and nicely done, but I have no idea how to put my apps inside the main project's src. As it is all are installed as if they were a library.

How do I move the apps from the node_modules directory to the /src/MY APPS HERE directory?