我正在使用nodejs和atlassian-connect-express构建Atlassian应用程序。我想使用angular,Typescript和SASS。因此,我尝试使用带有universal的角度服务器端渲染来设置此应用程序。
当我尝试运行以下命令时,我陷入了错误。
npm run build:ssr && npm run serve:ssr
错误消息是..
Error: Cannot find module '../lib/utils.js'
at Function.webpackEmptyContext [as resolve] (/path/to/application/dist/server.js:15654:10)
at /path/to/application/dist/server.js:47410:57
at Array.map (<anonymous>)
at Object.<anonymous> (/path/to/application/dist/server.js:47409:3)
at __webpack_require__ (/path/to/application/dist/server.js:20:30)
at Object.<anonymous> (/path/to/application/dist/server.js:47313:14)
at __webpack_require__ (/path/to/application/dist/server.js:20:30)
at Object.<anonymous> (/path/to/application/dist/server.js:47113:13)
at __webpack_require__ (/path/to/application/dist/server.js:20:30)
at Object.<anonymous> (/path/to/application/dist/server.js:23155:14) {
code: 'MODULE_NOT_FOUND'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! att-app@0.0.0 serve:ssr: `node -r esm dist/server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the att-app@0.0.0 serve:ssr script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
我尝试重新安装nodejs / npm。我尝试在webpack配置文件中添加Terser / Uglify插件,但失败了。我仍然收到此错误,并停留了很长时间。
可能是什么问题?