类型错误:无法读取未定义的属性(读取“导入”)

问题描述 投票:0回答:1

我在 Angular 17、Node.js v20.10.0 和所有 to=ime 中创建应用程序,我刷新或保存我的应用程序时收到此错误: node_modules/vite/dist/node/chunks/dep-68d1a114.js:45925 JSON.stringify(output.imports)), ^

TypeError:无法读取未定义的属性(读取“导入”) 在文件:///node_modules/vite/dist/node/chunks/dep-68d1a114.js:45925:47 在 process.processTicksAndRejections (节点:内部/进程/task_queues:95:5)

我该如何解决这个问题?

angular node-modules
1个回答
0
投票

这是由于 Vite https://github.com/vitejs/vite/issues/9327 中的错误而发生的,该错误与

cwd()
的 Nodes 实现中的错误有关。基本上,现在使用 Vite 的 Angular 不能正确遵循符号链接。

解决方案是仅在程序所在的磁盘实际位置运行程序,而不是从符号链接路径运行程序。

© www.soinside.com 2019 - 2024. All rights reserved.