Webpack-找不到模块:无法解析textAngular

时间:2018-08-29 19:56:50

标签: angular webpack textangular

我有一个使用webpack的应用程序,问题是捆绑时,所有其他软件包都可以正常加载,但是 textAngular 软件包未加载,并且webpack显示未找到模块错误。 textAngular软件包位于node_modules文件夹中,具有正确的读/写权限。 当我注释掉导入textAngular的行时,绑定成功完成。

Webpack产生如下所示的错误

  

./ app / player / player.module.ts中的错误       找不到模块:错误:无法解析“ textAngular / dist / textAngular-sanitize.min”   '/ home / arjun / Desktop / ruby​​_project / client / app / player'       在'/ home / arjun / Desktop / ruby​​_project / client / app / player'中解析'textAngular / dist / textAngular-sanitize.min'         解析的请求是一个模块         使用描述文件:/home/arjun/Desktop/ruby_project/client/package.json(相对路径:   ./app/player)           字段“浏览器”不包含有效的别名配置         使用描述文件后:/home/arjun/Desktop/ruby_project/client/package.json(相对路径:   ./app/player)           解析为模块             / home / arjun / Desktop / ruby​​_project / client / app / player / node_modules   不存在或不是目录             / home / arjun / Desktop / ruby​​_project / client / app / node_modules不存在或不是目录             / home / arjun / Desktop / ruby​​_project / node_modules不存在或不是目录             / home / arjun / Desktop / node_modules不存在或不是目录             / home / arjun / node_modules不存在或不是目录             / home / node_modules不存在或不是目录             / node_modules不存在或不是目录             在/ home / arjun / Desktop / ruby​​_project / client / node_modules中寻找模块               使用描述文件:/home/arjun/Desktop/ruby_project/client/package.json(相对路径:   ./node_modules)                 字段“浏览器”不包含有效的别名配置               使用描述文件后:/home/arjun/Desktop/ruby_project/client/package.json(相对路径:   ./node_modules)                 使用描述文件:/home/arjun/Desktop/ruby_project/client/package.json(相对路径:   ./node_modules/textAngular/dist/textAngular-sanitize.min)                   没有扩展                     字段“浏览器”不包含有效的别名配置                     /home/arjun/Desktop/ruby_project/client/node_modules/textAngular/dist/textAngular-sanitize.min不存在                   .ts                     字段“浏览器”不包含有效的别名配置                     /home/arjun/Desktop/ruby_project/client/node_modules/textAngular/dist/textAngular-sanitize.min.ts   不存在                   .js                     字段“浏览器”不包含有效的别名配置                     /home/arjun/Desktop/ruby_project/client/node_modules/textAngular/dist/textAngular-sanitize.min.js   不存在                   .html                     字段“浏览器”不包含有效的别名配置                     /home/arjun/Desktop/ruby_project/client/node_modules/textAngular/dist/textAngular-sanitize.min.html   不存在                   作为目录                     /home/arjun/Desktop/ruby_project/client/node_modules/textAngular/dist/textAngular-sanitize.min不存在       [/ home / arjun / Desktop / ruby​​_project / client / app / player / node_modules]       [/ home / arjun / Desktop / ruby​​_project / client / app / node_modules]       [/ home / arjun / Desktop / ruby​​_project / node_modules]       [/ home / arjun / Desktop / node_modules]       [/ home / arjun / node_modules]       [/ home / node_modules]       [/ node_modules]       [/home/arjun/Desktop/ruby_project/client/node_modules/textAngular/dist/textAngular-sanitize.min]       [/home/arjun/Desktop/ruby_project/client/node_modules/textAngular/dist/textAngular-sanitize.min.ts]       [/home/arjun/Desktop/ruby_project/client/node_modules/textAngular/dist/textAngular-sanitize.min.js]       [/home/arjun/Desktop/ruby_project/client/node_modules/textAngular/dist/textAngular-sanitize.min.html]       [/home/arjun/Desktop/ruby_project/client/node_modules/textAngular/dist/textAngular-sanitize.min]        @ ./app/player/player.module.ts 21:0-51        @ ./app/app.ts

0 个答案:

没有答案