如何解决Nestjs Oracle Config:找不到模块“../lib/utils.js”
我尝试使用 typeorm 在 nestJs 项目中配置 oracledb。当我 npm run build:ssr
项目执行时没有任何错误,但是当我生成 npm run serve:ssr
项目并执行它 /home/node/apps/dist/server.js:18662
throw e;
^
Error: Cannot find module '../lib/utils.js'
at Function.webpackEmptyContext [as resolve] (/home/node/apps/dist/server.js:18660:10)
at /home/node/apps/dist/server.js:328478:57
at Array.map (<anonymous>)
时,我收到以下错误:
UglifyJS
经过调查,我发现 nestJs 使用 Terser
所以我尝试切换到 const webpack = require('webpack');
const WebpackConfigFactory = require('@nestjs/ng-universal')
.WebpackConfigFactory;
module.exports = WebpackConfigFactory.create(webpack,{
server: './server/main.ts',// optimization: { ... }
});
但我现在的问题是我使用的是 nestjs 通用:旧版本下面的 webpack 服务器文件:
optimization
当我如上所示添加 configuration.entry should be one of these:
function | object { <key>: non-empty string | [non-empty string] } | non-empty strin
g | [non-empty string]
-> The entry point(s) of the compilation.
Details:
* configuration.entry['optimization'] should be a string.
-> The string is resolved to a module which is loaded upon startup.
* configuration.entry['optimization'] should be an array:
[non-empty string]
-> A non-empty array of non-empty strings
时,出现以下错误:
Cannot find module '../lib/utils.js'
我也尝试升级项目,以使用最新的 nestjs 通用版本,但仍然出现错误 webpack.server.config
。如果我使用的是没有 {
"title": "insufficient permissions","status": 403,"code": "E601110","cause": "forbidden: your current plan is limited to requests of size up to 15 origins and 100 destinations (max. 15x100),or 100 origins and 1 destination (max. 100x1)","action": "Please contact support for more information.","correlationId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
}
文件的最新 nestjs 通用版本,我该如何解决以下错误以及如何让 nestjs 使用 webpack。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。