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

ɵPendingTasksInternal is not exported by node_modules/@angular/core/fesm2022/core.mjs #1652

Open
2 tasks
seipeimathole opened this issue Mar 17, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@seipeimathole
Copy link

Please provide the environment you discovered this bug in.

@brandonroberts

I just upgraded analogjs to 1.14.0 and angular 18 and im getting the following error

[@analogjs/vite-plugin-nitro] node_modules/@analogjs/content/fesm2022/analogjs-content.mjs (2:58): "ɵPendingTasksInternal" is not exported by "node_modules/@angular/core/fesm2022/core.mjs", imported by "node_modules/@analogjs/content/fesm2022/analogjs-content.mjs".

it seem like @analogjs/content/fesm2022/analogjs-content.mjs is not compartible to angular version 18

Please advise

Which area/package is the issue in?

content

Description

I get the error when im running production build

Please provide the exception or error you saw

[@analogjs/vite-plugin-nitro] node_modules/@analogjs/content/fesm2022/analogjs-content.mjs (2:58): "ɵPendingTasksInternal" is not exported by "node_modules/@angular/core/fesm2022/core.mjs", imported by "node_modules/@analogjs/content/fesm2022/analogjs-content.mjs".

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@seipeimathole seipeimathole added the bug Something isn't working label Mar 17, 2025
@Lissy93
Copy link

Lissy93 commented Mar 17, 2025

I just had this too, I've just been updating dependencies, which as solved the issue for me (here). (and introduced a new issue, where the build consumes WAY too much memory)

@brandonroberts
Copy link
Member

I tested a new Angular 18 app with the content package and it works correctly. Make sure you delete your node_modules and reinstall after upgrading.

@Lissy93 how much more memory is it? You can try disabling sourcemaps in Nitro to decrease memory usage. Its a known issue

@Lissy93
Copy link

Lissy93 commented Mar 17, 2025

Hey @brandonroberts

Thanks for the suggestion. I've tried disableing sourcemaps, but no luck.

The issue persists. Locally the build does eventually succeed; if I allocate it tons of mem and wait 10 minutes. But on Vercel it fails with an out of memory issue.

Code I am trying with is on: https://github.com/Lissy93/domain-locker/tree/fix/vercel

I've been going round in circles for last 48 hours after upgrading dependencies with this. So any more suggestions would be much appreciated.

P.S I really enjoyed working with Analog on this project, thank you and your team for all your work 💖

@brandonroberts
Copy link
Member

@Lissy93 thanks! Will definitely take a look. Thanks for the repo

@Lissy93
Copy link

Lissy93 commented Mar 18, 2025

Thank you Brandon

I'm still strugling with this, since upgrading Angular + Analog, my Vercel builds no longer work, because they run out of mem everytime (on the Building Server phase).
However I have got it working locally and as a temp solution in a GitHub Action.

Error Logs

Vercel Error:

Vercel

Netlify Error

Netlify

Local Error

Local

What I've tried:
  • Removing package-lock, node_modules and cleaning cache. Tried both yarn and npm.
  • Setting a ludicrous max space size with NODE_OPTIONS='--max-old-space-size=16144'
  • Manually chunnking some dependencies with rollup.output.manualChunks
  • Enabling inlineDynamicImports in rollup.output
  • Removing all pre-rendering of static pages (plugins.analog.prerender)
  • Disabling sourcemaps
  • Updating nitro preferences, to allow inlineDeferedImports, minify, esbuild.minify and disable scanHandlers, serveStatic, dev
  • Removing large pics from assets
  • Analysing the mnem of different modules (see here)
  • I also tried 50 (literally) other things, in Fix/vercel Lissy93/domain-locker#8
Steps to reproduce

Deploying to Vercel

  1. Fork repo
  2. Import into Vercel
  3. Set the SUPABASE_URL and SUPABASE_ANON_KEY env vars to values you can copy from .env.sample
  4. Press deploy

or

Running Locally

git clone [email protected]:Lissy93/domain-locker.git
cd domain-locker
npm install --legacy-peer-deps
cp .env.sample .env
npm run dev

Then can build with npm run build (Node) or npm run build:vercel (Vercel)

I'm next working on trying to create a mimimal reproducable sample repo.

But if you've got any ideas or pointers, that would be really really helpful.

@brandonroberts
Copy link
Member

brandonroberts commented Mar 18, 2025

@Lissy93 I did look at your repo and was able to reproduce the OOM errors locally. One thing to add to the nitro object inside the analog plugin is sourcemap: false, which decreases memory usage during the build.

analog({
  nitro: {
    sourcemap: false
  }
});

I also opened a PR that does not include the server assets in the build process, which decreases the overall size of the server build and uses less memory due to less assets being bundled.

#1656

I tested the change against your repo and was able to finish the node and Vercel builds without OOM errors. You can update Analog packages to 1.15.0-beta.2 and see if that helps.

@brandonroberts
Copy link
Member

brandonroberts commented Mar 18, 2025

You can also exclude mermaid from the server build

withMarkdownRenderer({ loadMermaid: import.meta.env.SSR ? undefined : () => import('mermaid')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants