【问题标题】:Getting NPM error: "Resolving deps of app\app.ts failed."收到 NPM 错误:“解决 app\app.ts 的依赖失败。”
【发布时间】:2016-04-21 04:00:18
【问题描述】:

我正在尝试安装和使用this brunch.io skeleton。我一直遇到这个错误:

20 Apr 19:40:21 - info: application started on http://localhost:3333/
20 Apr 19:40:24 - info: compiling
20 Apr 19:40:28 - error: Resolving deps of app\app.ts failed. Could not load module 'app\home' from 'C:\Users\tyler.WORKGROUP\Documents\GitHub\zenith-folio\app'. Possible solution: add 'app' to package.json and `npm install`.
20 Apr 19:40:28 - error: Resolving deps of app\about\index.ts failed. Could not load module 'app\about\about.tpl' from 'C:\Users\tyler.WORKGROUP\Documents\GitHub\zenith-folio\app\about'. Possible solution: add 'app' to package.json and `npm install`.
20 Apr 19:40:28 - info: compiling.
20 Apr 19:40:29 - info: compiled 477 files into 2 files, copied index.html in 8.4 sec

我正在尽力了解这里发生了什么,但我不确定。我可以看到我需要将“app”添加到 package.json,但我不知道它如何指定或指定哪个“app”。是不是在说:

  • 名为“app”的文件夹
  • 名为 app.ts 的文件

或者我还缺少什么?

【问题讨论】:

  • 你能发布一些代码吗?关于如何尝试导入这些模块和您的 tsconfig 文件?

标签: node.js typescript angular


【解决方案1】:

消息很清楚:Could not load module 'app\home',这意味着您在app.ts 中有未解决的导入,可能看起来像import ... from 'app\home';

【讨论】:

  • 这是否意味着 app.ts 中的任何内容都会导致错误?看着它,它似乎引用了app\home 位置就好了。
  • 也许是app/home?你应该有现有的app/home.ts
  • 主文件夹中不存在这样的文件 - 只是一个 index.html。这可能是问题的根源。那我得联系开发商了!谢谢。
猜你喜欢
  • 2021-09-28
  • 1970-01-01
  • 2020-12-25
  • 1970-01-01
  • 2014-08-29
  • 1970-01-01
  • 2017-12-30
  • 2023-02-02
  • 1970-01-01
相关资源
最近更新 更多