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

Angular app suddenly throws error while building #2

Closed
bastibense opened this issue Dec 10, 2024 · 5 comments
Closed

Angular app suddenly throws error while building #2

bastibense opened this issue Dec 10, 2024 · 5 comments

Comments

@bastibense
Copy link

bastibense commented Dec 10, 2024

Hey there,

all of the sudden my Angular 19 builds started failing this morning (after running npm up).

Apparently gen-mapping 0.3.5 works, while 0.3.6 throws this error while running ng build -c production.

ng build -c production
⠙ Building...

node:internal/event_target:1094
  process.nextTick(() => { throw err; });
                           ^
Error: Cannot find module '/Users/bbense/coding/homeauto/homeauto-client/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js'
    at createEsmNotFoundErr (node:internal/modules/cjs/loader:1262:15)
    at finalizeEsmResolution (node:internal/modules/cjs/loader:1250:15)
    at resolveExports (node:internal/modules/cjs/loader:634:14)
    at Function._findPath (node:internal/modules/cjs/loader:724:31)
    at Function._resolveFilename (node:internal/modules/cjs/loader:1211:27)
    at Function._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at /Users/bbense/coding/homeauto/homeauto-client/node_modules/@ampproject/remapping/dist/remapping.umd.js:2:131
    at Object.<anonymous> (/Users/bbense/coding/homeauto/homeauto-client/node_modules/@ampproject/remapping/dist/remapping.umd.js:5:3)
Emitted 'error' event on WorkerPool instance at:
    at EventEmitterReferencingAsyncResource.runInAsyncScope (node:async_hooks:206:9)
    at WorkerPool.emit (node:events:170:18)
    at ThreadPool._onError (/Users/bbense/coding/homeauto/homeauto-client/node_modules/piscina/dist/index.js:232:34)
    at Worker.<anonymous> (/Users/bbense/coding/homeauto/homeauto-client/node_modules/piscina/dist/index.js:187:18)
    at Worker.emit (node:events:518:28)
    at [kOnErrorMessage] (node:internal/worker:326:10)
    at [kOnMessage] (node:internal/worker:337:37)
    at MessagePort.<anonymous> (node:internal/worker:232:57)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:820:20)
    at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28) {
  code: 'MODULE_NOT_FOUND',
  path: '/Users/bbense/coding/homeauto/homeauto-client/node_modules/@jridgewell/gen-mapping/package.json'
}

Any ideas?

Thanks!


Edit: I used npm i @jridgewell/[email protected] as a quick workaround to be able to compile for now.

@Jacobtims
Copy link

Jacobtims commented Dec 10, 2024

Same here, but with a Laravel project

@samchon
Copy link

samchon commented Dec 10, 2024

Same reason with #3. The dist directory has not been published.

@PiyushAgrawal1243
Copy link

Same issue we got, and after a little research, we found the temporary solution is adding below line in package.json.
"overrides": { "@jridgewell/gen-mapping": "0.3.5" }

@jridgewell
Copy link
Owner

I unpublished the broken version. Please rerun your package manager to pick up the previous v0.3.5

@tyrann0us
Copy link

3 (!) stars on GitHub, but 50 million weekly downloads 🤯

And people angrily requesting this to be "fixed ASAP" – another prime example of https://xkcd.com/2347/.
Thank you for your work, @jridgewell! 🙇🏽‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants