【发布时间】:2018-06-15 09:51:37
【问题描述】:
我从头开始使用 angular -cli 创建了 angular(6) 项目。 如the official wiki中所述创建库
尝试导入我的新库时出错。 我一直在检查配置 2 天。
ERROR in ./node_modules/tvmazerrr/fesm5/tvmaze.js
Module not found: Error: Can't resolve 'commonjs-proxy:./lib/tvmaze.component' in '/Users/alexanderkozhevin/Desktop/lib-demo/node_modules/tvmazerrr/fesm5'
ERROR in ./node_modules/tvmazerrr/fesm5/tvmaze.js
Module not found: Error: Can't resolve 'commonjs-proxy:./lib/tvmaze.module' in '/Users/alexanderkozhevin/Desktop/lib-demo/node_modules/tvmazerrr/fesm5'
ERROR in ./node_modules/tvmazerrr/fesm5/tvmaze.js
Module not found: Error: Can't resolve 'commonjs-proxy:./lib/tvmaze.service' in '/Users/alexanderkozhevin/Desktop/lib-demo/node_modules/tvmazerrr/fesm5'
ERROR in ./node_modules/tvmazerrr/fesm5/tvmaze.js
Module not found: Error: Can't resolve 'commonjs-proxy:./public_api' in '/Users/alexanderkozhevin/Desktop/lib-demo/node_modules/tvmazerrr/fesm5'
ERROR in ./node_modules/tvmazerrr/fesm5/tvmaze.js
Module not found: Error: Can't resolve 'commonjs-proxy:./tvmaze.component' in '/Users/alexanderkozhevin/Desktop/lib-demo/node_modules/tvmazerrr/fesm5'
ERROR in ./node_modules/tvmazerrr/fesm5/tvmaze.js
Module not found: Error: Can't resolve 'commonjs-proxy:@angular/core' in '/Users/alexanderkozhevin/Desktop/lib-demo/node_modules/tvmazerrr/fesm5'
ERROR in ./node_modules/tvmazerrr/fesm5/tvmaze.js
Module not found: Error: Can't resolve 'commonjsHelpers' in '/Users/alexanderkozhevin/Desktop/lib-demo/node_modules/tvmazerrr/fesm5'
【问题讨论】:
-
也许你在你的库的 package.json 中忘记了 commonjs-proxy?
-
不,这是包错误。 @Powkachu
-
@AlexanderKozhevin 请告诉我们您为解决包裹中的此错误所采取的步骤。
标签: angular angular-cli angular6