Hi, I got an error in the end-to-end testing process.
Locally it works fine. However, when I run through GitHub actions, it displays this error:
[Nest] 2787 - 01/20/2023, 5:20:08 PM ERROR [PackageLoader] The "@nestjs/platform-express" package is missing. Please, make sure to install this library ($ npm install @nestjs/platform-express) to take advantage of NestFactory.
● process.exit called with "1"
13 | }).compile();
14 |
> 15 | app = moduleRef.createNestApplication();
| ^
16 |
17 | const validationPipe = new ValidationPipe({
18 | transform: true,
at loadPackage (../../node_modules/@nestjs/common/utils/load-package.util.js:14:17)
at TestingModule.createHttpAdapter (../../node_modules/@nestjs/testing/testing-module.js:31:72)
at TestingModule.createNestApplication (../../node_modules/@nestjs/testing/testing-module.js:19:21)
at Object.<anonymous> (test/app.e2e.spec.ts:15:21)
E2E spec:
let app: INestApplication;
beforeAll(async () => {
const moduleRef = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = moduleRef.createNestApplication();
const validationPipe = new ValidationPipe({
transform: true,
});
app.useGlobalPipes(validationPipe);
await app.init();
});
Has anyone experienced this failure?
Thanks in advance for the help.