Node.js 丢失的引起;未找到模块";-网页包
我有一个使用webpack bundler的节点应用程序。每次我试图妥协时,我都会出现以下错误:Node.js 丢失的引起;未找到模块";-网页包,node.js,webpack,node-modules,css-loader,Node.js,Webpack,Node Modules,Css Loader,我有一个使用webpack bundler的节点应用程序。每次我试图妥协时,我都会出现以下错误: Error: Cannot resolve module 'test/qfla-server/node_modules/style-loader/addStyles.js' in /home/backman/!test/tta/app/renderer resolve module test/tta/node_modules/style-loader/addStyles.js in /home/ba
Error: Cannot resolve module 'test/qfla-server/node_modules/style-loader/addStyles.js' in /home/backman/!test/tta/app/renderer
resolve module test/tta/node_modules/style-loader/addStyles.js in /home/backman/!test/tta/app/renderer
looking for modules in /home/backman/!test/tta/node_modules
/home/backman/!test/tta/node_modules/test doesn't exist (module as directory)
looking for modules in /home/backman/node_modules
/home/backman/node_modules/test doesn't exist (module as directory)
[/home/backman/!test/tta/node_modules/test]
[/home/backman/node_modules/test]
很明显,节点_模块的路径错误,测试有“!”在它之前。这只发生在样式和css加载器上。有什么方法可以让webpack正确地解释这种方式吗?它是
css加载程序
bug。您可以禁用css的源映射生成以避免此错误。默认情况下不是禁用了源映射吗?是的,默认情况下是禁用的。我原以为bug出现在css加载程序中,但它是样式加载程序:那么有没有办法绕过它呢?我不使用源代码映射。仅修补样式加载程序
或重命名!测试
文件夹至测试