失踪 !导致"未找到模块" - 网络包

时间:2016-04-13 14:50:24

标签: 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/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]

对于node_modules的错误路径显然存在问题,测试有'!'在它之前。这只发生在样式和css加载器上。有没有什么方法可以让webpack正确地解释这种方式?

0 个答案:

没有答案