Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
WangShuXian6 opened this issue Jan 14, 2022 · 1 comment
Open

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

WangShuXian6 opened this issue Jan 14, 2022 · 1 comment

Comments

@WangShuXian6
Copy link

WangShuXian6 commented Jan 14, 2022

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.
@s2925534
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants