gpt4 book ai didi

angular - Uncaught TypeError : r. existsSync 不是 Angular 6 和 Electron 桌面应用程序中的函数

转载 作者:行者123 更新时间:2023-12-03 12:26:24 25 4
gpt4 key购买 nike

我正在将桌面应用程序从 Angular 5 和 Electron 2 框架升级到 Angular 6,但在运行/构建应用程序时出现此错误:npm start运行electron . .

错误:

Uncaught TypeError: r.existsSync is not a function
at Object.<anonymous> (main.4ff68b38699fd48ecfa7.js:1)
at Object.vbkW (main.4ff68b38699fd48ecfa7.js:1)
at p (runtime.a66f828dca56eeb90e02.js:1)
at Object.zUnb (main.4ff68b38699fd48ecfa7.js:1)
at p (runtime.a66f828dca56eeb90e02.js:1)
at Object.7 (main.4ff68b38699fd48ecfa7.js:1)
at p (runtime.a66f828dca56eeb90e02.js:1)
at n (runtime.a66f828dca56eeb90e02.js:1)
at Array.e [as push] (runtime.a66f828dca56eeb90e02.js:1)
at main.4ff68b38699fd48ecfa7.js:1

我认为这只是 Angular 6 的问题。我从这个错误堆栈跟踪中无法理解太多。该应用程序在 Angular 5 中运行良好。
任何帮助深表感谢。

最佳答案

打包的捆绑包必须破坏某些东西。 This issue看起来非常相似。

你能尝试替换require('fs')吗?与 window.require('fs')正如那里所建议的那样。

关于angular - Uncaught TypeError : r. existsSync 不是 Angular 6 和 Electron 桌面应用程序中的函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50962400/

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