angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Snapdragon X Elite Arm / Windows , No native build was found for platform=win32 arch=arm64

Open ssdeepak opened this issue 1 year ago • 7 comments

Which @angular/* package(s) are the source of the bug?

compiler, core, Don't known / other

Is this a regression?

Yes

Description

I tried Angular 18 on my new Snapdragon X Elite

When I try to run the project from VSCode I get this error. No native build was found for platform=win32 arch=arm64 runtime=node abi=127 uv=1 armv=8 libc=glibc node=22.3.0 attempted loading from: D:\Junk\my-app\node_modules\lmdb and package: @lmdb/lmdb-win32-arm64

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

ng serve --o
Application bundle generation failed. [0.406 seconds]

X [ERROR] No native build was found for platform=win32 arch=arm64 runtime=node abi=127 uv=1 armv=8 libc=glibc node=22.3.0
    attempted loading from: D:\Junk\my-app\node_modules\lmdb and package: @lmdb/lmdb-win32-arm64
 [plugin angular-compiler]

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 18.0.4
Node: 22.3.0
Package Manager: npm 10.8.1
OS: win32 arm64

Angular: 18.0.3
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1800.4
@angular-devkit/build-angular   18.0.4
@angular-devkit/core            18.0.4
@angular-devkit/schematics      18.0.4
@angular/cli                    18.0.4
@schematics/angular             18.0.4
rxjs                            7.8.1
typescript                      5.4.5
zone.js                         0.14.7

Anything else?

React JS works Fine on the same platform

ssdeepak avatar Jun 18 '24 21:06 ssdeepak

The workspace still builds with node 18.

https://github.com/angular/angular/blob/0bd55a684f7adf83ceb7d6c0b1d510252209388c/WORKSPACE#L50-L63

Afaik arm64 on windows is only support from Node19 onwards.

JeanMeche avatar Jun 18 '24 21:06 JeanMeche

@ssdeepak for clarity, is this about building an Angular app, or building this repo? I think it's the former as you're referring to ng serve, but wanting to make sure.

JoostK avatar Jun 19 '24 12:06 JoostK

oh you're right @JoostK, this is no the repo build but an app build.

lmdb is a native dependency, that looks like isn't supported yet on win-arm64 platforms. Sending over to the CLI repo.

JeanMeche avatar Jun 19 '24 12:06 JeanMeche

I have reported an issue to the upstream repository: https://github.com/kriszyp/lmdb-js/issues/295

alan-agius4 avatar Jun 19 '24 13:06 alan-agius4

same here it's annoing to stuck on angular 17 😢

sykum avatar Jul 16 '24 18:07 sykum

This should no longer error when using Angular CLI version 18.1.

alan-agius4 avatar Jul 16 '24 18:07 alan-agius4

Thank you very much for the info and I look forward to testing it and will give feedback.

sykum avatar Jul 17 '24 10:07 sykum

Why not add lmdb as an optional dependency instead since it actually is from 18.1 @alan-agius4 ? My project now fails pnpm install on windows arm64, and I worked around this by adding:

  "pnpm": {
    "overrides": {
      "@angular/build>lmdb": "-"
    }
  },
  "optionalDependencies": {
    "lmdb": "3.1.3"
  }

If lmdb was added via optionalDependencies in @angular/build then pnpm install would work without workarounds, and just drop install and show your runtime warning on unsupported platforms...

atsjo avatar Oct 05 '24 11:10 atsjo

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.