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

[@vitejs/plugin-legacy] Cannot read property 'fileName' of undefined with ?worker&inline #3670

Closed
tjk opened this issue Jun 3, 2021 · 3 comments · Fixed by #3886
Closed

Comments

@tjk
Copy link
Contributor

tjk commented Jun 3, 2021

Describe the bug

Please see log output below. Is this just undocumented but expected?

System Info

npx: installed 1 in 0.653s

  System:
    OS: Linux 5.10 Ubuntu 20.04.2 LTS (Focal Fossa)
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11900KF @ 3.50GHz
    Memory: 8.46 GB / 12.38 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 12.18.1 - ~/.asdf/installs/nodejs/12.18.1/bin/node
    Yarn: 1.22.5 - ~/.asdf/shims/yarn
    npm: 6.14.5 - ~/.asdf/installs/nodejs/12.18.1/bin/npm
  npmPackages:
    @vitejs/plugin-vue: ^1.2.3 => 1.2.3
    vite: ^2.3.6 => 2.3.6

Used package manager: yarn

Logs

[0]  2794 modules transformed.
[0] [vite:worker] Cannot read property 'fileName' of undefined
[0] file: /frontend/node_modules/monaco-editor/esm/vs/editor/editor.worker.js?worker&inline
[0] error during build:
[0] TypeError: Cannot read property 'fileName' of undefined
[0]     at transformIndexHtml (/frontend/node_modules/@vitejs/plugin-legacy/index.js:305:17)
[0]     at applyHtmlTransforms (/frontend/node_modules/vite/dist/node/chunks/dep-cb562f8f.js:24645:27)
[0]     at Object.generateBundle (/frontend/node_modules/vite/dist/node/chunks/dep-cb562f8f.js:24605:32)
[0]     at /frontend/node_modules/rollup/dist/shared/rollup.js:19044:25
@github-actions
Copy link

github-actions bot commented Jun 4, 2021

Hello @tjk. Please provide a online reproduction by codesandbox or a minimal GitHub repository. Issues labeled by need reproduction will be closed if no activities in 3 days.

@tjk
Copy link
Contributor Author

tjk commented Jun 4, 2021

Here is the repro: https://github.com/tjk/vite-legacy-issue

@github-actions
Copy link

This issue gets locked because it has been closed for more than 14 days.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants