question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Worker with import is failing to build since alpha.5

See original GitHub issue

Describe the bug

I am going through the process of a major refactor into a monorepo for my company’s code base and ran into the below issue when running vite build on alpha.8 and later while it builds successfully on alpha.7. I don’t have a minimal reproduction yet, may be easier for me to debug off my codebase and attempt a PR if possible, but wanted to make an issue to see if the output was helpful or if I could be given direction to look into this issue.

Reproduction

tbd

System Info

System:
    OS: Linux 5.15 Gentoo/Linux
    CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
    Memory: 8.20 GB / 18.71 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 16.13.1 - /usr/bin/node
    Yarn: 1.22.18 - ~/.local/share/pnpm/yarn
    npm: 8.6.0 - /usr/bin/npm
    Watchman: 2022.03.21.00 - /usr/bin/watchman
  Browsers:
    Firefox: 91.7.0esr
  npmPackages:
    @vitejs/plugin-vue: 3.0.0-alpha.1 => 3.0.0-alpha.1
    vite: 3.0.0-alpha.8 => 3.0.0-alpha.8

Used Package Manager

pnpm

Logs

transforming (171) src/assets/layouts/GridTwoEqualColumns.ymlUnexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/vue.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/vuex.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/vue-router.js"
(vite:worker) transform "/home/kalvens/rtvision-app/mono/apps/app-ui/src/workers/IndexdbWorker.ts?worker"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/ajv.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/ajv-formats.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/fast-copy.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/mathjs.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/luxon.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/number-to-words.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/string-similarity.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/insane.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/hash-sum.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/marked.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/localforage.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/localforage-getitems.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/localforage-setitems.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/ol_tilecoord.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/@quasar_extras_mdi-v6.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/pako.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/papaparse.js"
error during build:
Error: Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/vue.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/vuex.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/vue-router.js"
(vite:worker) transform "/home/kalvens/rtvision-app/mono/apps/app-ui/src/workers/IndexdbWorker.ts?worker"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/ajv.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/ajv-formats.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/fast-copy.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/mathjs.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/luxon.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/number-to-words.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/string-similarity.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/insane.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/hash-sum.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/marked.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/localforage.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/localforage-getitems.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/localforage-setitems.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/ol_tilecoord.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/@quasar_extras_mdi-v6.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/pako.js"
(vite:optimized-deps-build) load "/home/kalvens/rtvision-app/mono/apps/app-ui/node_modules/.vite/deps_build/papaparse.js"
    at EventEmitter.handleEmptyEventLoop (file:///home/kalvens/rtvision-app/mono/node_modules/.pnpm/rollup@2.75.5/node_modules/rollup/dist/es/shared/rollup.js:23152:20)
    at Object.onceWrapper (node:events:509:28)
    at EventEmitter.emit (node:events:402:35)
    at process.<anonymous> (file:///home/kalvens/rtvision-app/mono/node_modules/.pnpm/rollup@2.75.5/node_modules/rollup/dist/es/shared/rollup.js:23146:55)
    at process.emit (node:events:390:28)


### Validations

- [X] Follow our [Code of Conduct](https://github.com/vitejs/vite/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitejs.dev/guide).
- [X] Check that there isn't [already an issue](https://github.com/vitejs/vite/issues) that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vitejs.dev/).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kalvenschrautcommented, Jun 10, 2022

Everything is working again as expected, trying to use the alpha for the import.meta changes.

Thanks for your prompt response and fix!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 10 webworker Cannot find name 'Element'. - How to ...
In my case, I had used ng generate service to create a dependency of my worker, and the generator automatically put @angular/core import...
Read more >
WorkerGlobalScope.importScripts() - Web APIs | MDN
The importScripts() method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
Read more >
Safari Technology Preview Release Notes - Apple Developer
Changed to make sure nested worker gets controlled if matching a service worker registration ... Fixed WASM failing to execute after window.open (r292229) ......
Read more >
Web service error codes (Microsoft Dataverse) - Power Apps
Message: This operation failed since it exceeded the maximum entity limit of {0} ... Message: An error occurred while importing App Modules.
Read more >
Jest-worker NPM | npm.io
import {Worker as JestWorker} from 'jest-worker'; async function main() { const ... After the worker has executed a task the memory usage of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found