-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pnpm pack error after 3.12.3 upgrade #309
Comments
Would you be able to provide a reproduction? 🙏 More infoWhy do I need to provide a reproduction?Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making. What will happen?If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect. If How can I create a reproduction?We have a couple of templates for starting with a minimal reproduction: 👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz A public GitHub repository is also perfect. 👌 Please ensure that the reproduction is as minimal as possible. See more details in our guide. You might also find these other articles interesting and/or helpful: |
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: 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 Should I no longer be exporting types from inside the runtime directory, or has a Nuxt change broken this functionality? |
I can confirm that moving the generated types out of the runtime directory fixes this issue. |
`names` can be null with star exports. Upstream fix to improve ts: unjs/mlly#273 Fixes nuxt#309
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
The text was updated successfully, but these errors were encountered: