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

Unable to build angular #11063

Open
sp90 opened this issue May 14, 2024 · 2 comments
Open

Unable to build angular #11063

sp90 opened this issue May 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@sp90
Copy link

sp90 commented May 14, 2024

What version of Bun is running?

1.1.8-canary.1+f2cfa15e4

What platform is your computer?

Darwin 23.4.0 arm64 arm

What steps can reproduce the bug?

  • ng new test-project --minimal, it has a few questions I choose Sass (SCSS), SSR/Prerendering No
  • bun run --bun start or bun run --bun build

What is the expected behavior?

Expected output for start

Screenshot 2024-05-14 at 09 21 31


Expected output for build

Screenshot 2024-05-14 at 09 22 11

What do you see instead?

Start as image and text

Screenshot 2024-05-14 at 09 20 40
❯ bun run --bun start    
$ ng serve
Node.js version v21.6.0 detected.
Odd numbered Node.js versions will not enter LTS status and should not be used for production. For more information, please see https://nodejs.org/en/about/previous-releases/.
You seem to not be depending on "@angular/core". This is an error.

Build as image and text

Screenshot 2024-05-14 at 09 19 26
❯ bun run --bun build    
$ ng serve
Node.js version v21.6.0 detected.
Odd numbered Node.js versions will not enter LTS status and should not be used for production. For more information, please see https://nodejs.org/en/about/previous-releases/.
You seem to not be depending on "@angular/core". This is an error.

Additional information

This is a barebone angular project with the minimal amount of setup

@sp90 sp90 added the bug Something isn't working label May 14, 2024
@gernathlub
Copy link

I encountered similar issue but with following error message:

error: error: Cannot find module "@ampproject/remapping" from "...\.bun\install\cache\@angular-devkit\build-angular@17.3.7\src\tools\sass\worker.js"

all packages are correctly installed (including mentioned @angular-devkit and @ampproject/remapping) and app runs absolutely fine without --bun flag. Error occurs on both windows and WSL2 (Ubuntu). Maybe an issue with nvm? As I noticed, in output is mentioned node version 21, ignoring currently used nvm node version (even if v21 not installed)

@sp90
Copy link
Author

sp90 commented May 28, 2024

Reason why it runs fine without --run is because it then uses node under the hood due to shebangs

Looks something like this: #!/usr/bin/env node

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

2 participants