我想在电子应用程序中公开 REST 服务,并且我想将 expressJS 与电子一起使用,如教程所述,我添加了 express 和 @types/express。我试图公开一个“get”,但是当我构建并运行它时会抛出以下内容。
跑着 ng build --prod
Run Code Online (Sandbox Code Playgroud)ERROR in ./node_modules/cookie-signature/index.js Module not found: Error: Can't resolve 'crypto' in 'app\node_modules\cookie-signature' ERROR in ./node_modules/etag/index.js Module not found: Error: Can't resolve 'crypto' in 'app\node_modules\etag' ERROR in ./node_modules/destroy/index.js Module not found: Error: Can't resolve 'fs' in 'app\node_modules\destroy' ERROR in ./node_modules/etag/index.js Module not found: Error: Can't resolve 'fs' in 'app\node_modules\etag' ERROR in ./node_modules/express/lib/view.js Module not found: Error: Can't resolve 'fs' in 'app\node_modules\express\lib' ERROR in ./node_modules/mime/mime.js Module not found: Error: Can't …