Skip to content
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

[🐞] Provide more data for [vite-plugin-qwik-post] Cannot read properties of undefined (reading 'fileName') #6895

Open
Nefcanto opened this issue Sep 22, 2024 · 6 comments
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@Nefcanto
Copy link

Which component is affected?

Qwik Runtime

Describe the bug

npm run build fails in my CI/CD with this message:

#8 23.42 x Build failed in 19.75s
#8 23.42 error during build:
#8 23.42 [vite-plugin-qwik-post] Cannot read properties of undefined (reading 'fileName')
#8 23.42     at file:///npm/node_modules/@builder.io/qwik/dist/optimizer.mjs:1649:145
#8 23.42     at Array.map (<anonymous>)
#8 23.42     at generateManifestFromBundles (file:///npm/node_modules/@builder.io/qwik/dist/optimizer.mjs:1649:108)
#8 23.42     at Object.generateManifest (file:///npm/node_modules/@builder.io/qwik/dist/optimizer.mjs:2374:24)
#8 23.42     at Object.handler (file:///npm/node_modules/@builder.io/qwik/dist/optimizer.mjs:6252:49)
#8 23.42     at file:///npm/node_modules/rollup/dist/es/shared/node-entry.js:19936:40
#8 23.42     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

npm run build works in my local environment.

I know it might be a problem related to our CI/CD. But, you should give us more details about this error. Right now, there is no data in this error related to my code.

Reproduction

I can't produce an MRE

Steps to reproduce

No response

System Info

System:
    OS: Linux 6.8 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (4) x64 Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
    Memory: 8.95 GB / 15.53 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 20.17.0 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.8.3 - /usr/local/bin/npm
  Browsers:
    Chromium: 129.0.6668.58
  npmPackages:
    @builder.io/partytown: ^0.10.2 => 0.10.2 
    @builder.io/qwik: ^1.9.0 => 1.9.0 
    @builder.io/qwik-auth: ^0.2.2 => 0.2.2 
    @builder.io/qwik-city: ^1.9.0 => 1.9.0 
    typescript: ^5.6.2 => 5.6.2 
    undici: ^6.19.8 => 6.19.8 
    vite: ^5.4.4 => 5.4.6

Additional Information

No response

@Nefcanto Nefcanto added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Sep 22, 2024
@Nefcanto
Copy link
Author

I think this line causes the problem.

@wmertens
Copy link
Member

This is fixed in #6888. Can you verify with the packages here: https://github.com/QwikDev/qwik/actions/runs/10960904575/job/30437326583#step:13:26

@Nefcanto
Copy link
Author

@wmertens, thank you so much for this fast response. Two notes:

  1. I don't know how to use those builds. Can you please provide a hint?
  2. It's good to add more data if possible to errors.

@Nefcanto
Copy link
Author

@wmertens, I'm still stuck. Can you help with how should I use those packages?

@wmertens
Copy link
Member

@Nefcanto you have to replace the versions in package.json with the urls given there and then run your package manager (e.g. pnpm i)

@builder.io/qwik: npm i https://pkg.pr.new/@builder.io/qwik@ae09275
@builder.io/qwik-city: npm i https://pkg.pr.new/@builder.io/qwik-city@ae09275
eslint-plugin-qwik: npm i https://pkg.pr.new/eslint-plugin-qwik@ae09275
create-qwik: npm i https://pkg.pr.new/create-qwik@ae09275

@gimonaa
Copy link
Contributor

gimonaa commented Sep 25, 2024

Thanks, this solved my problem too.
vite v5.4.8 building for production... ✓ 1101 modules transformed. x Build failed in 3.49s error during build: [vite-plugin-qwik-post] Cannot read properties of undefined (reading 'fileName') at file:///Users/alessandrogimona/Git/qwik/preweb3-qwik/node_modules/@builder.io/qwik/dist/optimizer.mjs:1649:145 at Array.map (<anonymous>) at generateManifestFromBundles (file:///Users/alessandrogimona/Git/qwik/preweb3-qwik/node_modules/@builder.io/qwik/dist/optimizer.mjs:1649:108) at Object.generateManifest (file:///Users/alessandrogimona/Git/qwik/preweb3-qwik/node_modules/@builder.io/qwik/dist/optimizer.mjs:2374:24) at Object.handler (file:///Users/alessandrogimona/Git/qwik/preweb3-qwik/node_modules/@builder.io/qwik/dist/optimizer.mjs:6252:49) at file:///Users/alessandrogimona/Git/qwik/preweb3-qwik/node_modules/rollup/dist/es/shared/node-entry.js:19936:40 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants