Skip to content

ng build error: Invalid version: "15.2-15.3" #22606

@shakeri

Description

@shakeri

🐞 Bug report

Command (mark with an x)

  • new
    build
    serve
    test
    e2e
    generate
    add
    update
    lint
    extract-i18n
    run
    config
    help
    version
    doc

Description

When i build project with Angular CLI, I get this error:

An unhandled exception occurred: Transform failed with 1 error: error: Invalid version: "15.2-15.3" See "C:\Users\MOHAMM~1\AppData\Local\Temp\ng-JBqIfM\angular-errors.log" for further details.

And in angular-errors.log file:

[error] HookWebpackError: Transform failed with 1 error:
error: Invalid version: "15.2-15.3"
    at makeWebpackError (E:\workingfolder\test-app\node_modules\webpack\lib\HookWebpackError.js:48:9)
    at E:\workingfolder\test-app\node_modules\webpack\lib\Compilation.js:3057:12
    at eval (eval at create (E:\workingfolder\test-app\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:98:1)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
-- inner error --
Error: Transform failed with 1 error:
error: Invalid version: "15.2-15.3"
    at failureErrorWithLog (E:\workingfolder\test-app\node_modules\@angular-devkit\build-angular\node_modules\esbuild\lib\main.js:1557:15)
    at E:\workingfolder\test-app\node_modules\@angular-devkit\build-angular\node_modules\esbuild\lib\main.js:1346:29
    at E:\workingfolder\test-app\node_modules\@angular-devkit\build-angular\node_modules\esbuild\lib\main.js:637:9
    at handleIncomingPacket (E:\workingfolder\test-app\node_modules\@angular-devkit\build-angular\node_modules\esbuild\lib\main.js:734:9)
    at Socket.readFromStdout (E:\workingfolder\test-app\node_modules\@angular-devkit\build-angular\node_modules\esbuild\lib\main.js:604:7)
    at Socket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:199:23)

🌍 Your Environment



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 13.2.0
Node: 16.13.2
Package Manager: npm 8.4.0
OS: win32 x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1302.0
@angular-devkit/build-angular   13.2.0
@angular-devkit/core            13.2.0
@angular-devkit/schematics      13.2.0
@schematics/angular             13.2.0
rxjs                            7.5.2
typescript                      4.5.5

Activity

idwebmedia

idwebmedia commented on Jan 29, 2022

@idwebmedia

Literally was coming here to post the exact error. thanks

jmbarbier

jmbarbier commented on Jan 29, 2022

@jmbarbier

This comes from browserslist

npx browserslist

and_chr 97
and_ff 95
and_qq 10.4
and_uc 12.12
android 97
baidu 7.12
chrome 97
chrome 96
chrome 95
chrome 94
edge 97
edge 96
firefox 96
firefox 95
firefox 94
firefox 91
firefox 78
ie 11
ios_saf 15.2-15.3
ios_saf 15.0-15.1
ios_saf 14.5-14.8
ios_saf 14.0-14.4
ios_saf 12.2-12.5
kaios 2.5
op_mini all
op_mob 64
opera 82
opera 81
safari 15.2-15.3
safari 15.1
safari 14.1
safari 13.1
samsung 16.0
samsung 15.0

The versions interval comes from here :

ios_saf 15.2-15.3

clearing .browserslistrc makes compilation happy again but this is not a real solution !

idwebmedia

idwebmedia commented on Jan 29, 2022

@idwebmedia

This comes from browserslist

npx browserslist

and_chr 97
and_ff 95
and_qq 10.4
and_uc 12.12
android 97
baidu 7.12
chrome 97
chrome 96
chrome 95
chrome 94
edge 97
edge 96
firefox 96
firefox 95
firefox 94
firefox 91
firefox 78
ie 11
ios_saf 15.2-15.3
ios_saf 15.0-15.1
ios_saf 14.5-14.8
ios_saf 14.0-14.4
ios_saf 12.2-12.5
kaios 2.5
op_mini all
op_mob 64
opera 82
opera 81
safari 15.2-15.3
safari 15.1
safari 14.1
safari 13.1
samsung 16.0
samsung 15.0

The versions interval comes from here :

ios_saf 15.2-15.3

clearing .browserslistrc makes compilation happy again but this is not a real solution !

works. thanks

cvandradg

cvandradg commented on Jan 30, 2022

@cvandradg

Removing content or properly configurating .browserslistrc file fixes it indeed. Thanks @idwebmedia

modified the milestone: needsTriage on Jan 30, 2022
modified the milestones: needsTriage, Backlog on Jan 30, 2022

126 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Participants

    @hoeni@jmbarbier@idwebmedia@alessiostalla@mshima

    Issue actions

      ng build error: Invalid version: "15.2-15.3" · Issue #22606 · angular/angular-cli