gpt4 book ai didi

angular7 - 模块构建失败(来自 ./node_modules/@ngtools/webpack/src/index.js):

转载 作者:行者123 更新时间:2023-12-04 04:32:50 29 4
gpt4 key购买 nike

我在 angular 7 和 ionic 4 上创建了一个应用程序。
我试图编辑 app.routing.ts 文件,设置路径和组件。从那时起,我在下面收到此错误:

ERROR in ./src/app/department/department.module.ts
[ng] Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
[ng] Error: ENOENT: no such file or directory, open 'C:\Users\x\department\department.module.ts'
[ng] at Object.openSync (fs.js:436:3)
[ng] at Object.readFileSync (fs.js:341:35)
[ng] at Storage.provideSync (C:\Users\x\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:98:13)

最佳答案

确保部门组件存在,检查与您引用的文件名对应的 templateUrl。在修改 app.routing.ts 文件的过程中,您也可能在不知不觉中修改了路径。

C:\Users\x\department\department.module.ts

关于angular7 - 模块构建失败(来自 ./node_modules/@ngtools/webpack/src/index.js):,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56629423/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com