Open matt-clegg opened 2 days ago
Would you be able to provide a reproduction? 🙏
I've think managed to reproduce the issue. The error was happening in our module.
Inside our module.ts file we have the following line:
export * from "./runtime/composables/resources/generated/types";
This points to a file with about 3.4k lines of auto-generated types from our backend, this file was generated by NSwag. It looks something like:
// ----------------------
// <auto-generated>
// Generated using the NSwag toolchain v14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
// </auto-generated>
// ----------------------
export interface FooRepresentation {
key: string;
label: string;
url: string;
}
export interface BarDto {
title?: string | undefined;
description: string | undefined;
flag: boolean;
}
// 3000 more lines of interfaces and enums...
Commenting out the line in module.ts to export the types allows the pnpm pack command to complete.
So it seems the issue is caused by specifying a file inside the runtime folder is causing the pnpm pack error. I moved the generated types out of the runtime folder and changed the export command from export * from "./runtime/composables/resources/generated/types";
to export * from "./generated-types"
, and the pack command worked.
Should I no longer be exporting types from inside the runtime directory, or has a Nuxt change broken this functionality?
Environment
Operating System: Linux Node Version: v20.5.1 Nuxt Version: 3.12.3 CLI Version: 3.12.0 Nitro Version: 2.9.7 Package Manager: pnpm@9.4.0 Builder: - User Config: - Runtime Modules: - Build Modules: -
This was also running inside a Docker container, using
node:20.5-bullseye-slim
as a base image.Reproduction
I'm unable to create a reproduction of this issue as this from a large, internal project. This issue happens in our CI pipeline.
Describe the bug
After upgrading to Nuxt v3.12.3 our CI pipeline has started erroring when running
pnpm pack
.This is the error:
Our CI pipeline was running fine before upgrading to v3.12.3. I'm wondering if anyone else has seen this and what might have changed in this release for the pack command to break like this. Unfortunately there is no other information in the lofs that point to lines in our codebase.
I cant supply our source code as it's internal to our company. I hope this error is enough to be pointed in the right direction. I can provide other information, if needed.
Additional context
No response
Logs
No response