Repository navigation
Closed
Description
Command
serve
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
17.0.9
Description
Hey,
We've just upgraded from 17.0.9 to 17.1.0 and when running ng server we are getting these logs in console on each request -
9:08:17 AM [vite] Pre-transform error: Failed to load url /pdf/diet/polyfills.js (resolved id: /pdf/diet/polyfills.js). Does the file exist?
9:08:17 AM [vite] Pre-transform error: Failed to load url /pdf/diet/main.js (resolved id: /pdf/diet/main.js). Does the file exist?
9:06:33 AM [vite] Pre-transform error: Failed to load url /auth/trainer/dashboard/polyfills.js (resolved id: /auth/trainer/dashboard/polyfills.js). Does the file exist?
9:06:33 AM [vite] Pre-transform error: Failed to load url /auth/trainer/dashboard/main.js (resolved id: /auth/trainer/dashboard/main.js). Does the file exist?
As you can see the path changes based on the URL of request.
It doesn't seem to have any effect on functionality from our testing as it seems to work just fine, but why are we getting these logs? Can someone help as determine as to what might be the cause of this?
Minimal Reproduction
Exception or Error
No response
Your Environment
Angular CLI: 17.1.0
Node: 18.18.2
Package Manager: npm 9.8.1
OS: win32 x64
Angular: 17.1.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, localize, platform-browser, platform-browser-dynamic
... platform-server, router, ssr
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1701.0
@angular-devkit/build-angular 17.1.0
@angular-devkit/core 17.1.0
@angular-devkit/schematics 17.1.0
@schematics/angular 17.1.0
rxjs 7.8.1
typescript 5.3.3
zone.js 0.14.3
Anything else relevant?
No response
Reacted by Fabian Lainé, Telma C., Alexandr Pivovarov, Lars Rye Jeppesen, Oleh Baranovskyi, Mario Mishevski, anisabboud and Stefano Tomaiuolo
Activity
alan-agius4 commentedon Jan 18, 2024
This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please?
You can read here why this is needed. A good way to make a minimal repro is to create a new app via
ng new repro-appand adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.This might be related to your directory structure so its really important to get an accurate repro to diagnose this.
fabian-laine commentedon Jan 18, 2024
I have the same problem on 3 different projects after update
tirtza-weinfeld commentedon Jan 18, 2024
As a workaround
to prevent Vite load errors
angular.json
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"externalDependencies":[""],
This simply set the preTransformRequests option to false
telmaco commentedon Jan 19, 2024
same issue here , just did the update 😥
BeSaRa commentedon Jan 20, 2024
I have the same issue on 5 different projects after update
armingdev commentedon Jan 20, 2024
Here is some info about this issue:
I'm using the latest MacOS 14.2.1
Node version:
NG version:
Here is a repo to reproduce:
github.com/armingdev/angular-bug
command to run:
When I hit route in my Angular 17.1.0 with SSR: http://localhost:4200/users/1
I got the error in the console:
I hope this helps you.
fix(@angular-devkit/build-angular): pre-transform error when using vi…
fix(@angular-devkit/build-angular): pre-transform error when using vi…
fix(@angular-devkit/build-angular): pre-transform error when using vi…
fix(@angular-devkit/build-angular): pre-transform error when using vi…
angular-automatic-lock-bot commentedon Feb 22, 2024
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.