-
Notifications
You must be signed in to change notification settings - Fork 12k
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
ng build with node package not polyfill #27425
Comments
The root cause is diegomura/react-pdf#2624 here, where the mentioned package does not expose its browser bundle to modern ESM bundlers.
|
I find react-pdf has browser version
error
|
I don't know of a way to workaround diegomura/react-pdf#2624, the package has to expose its browser bundle in its |
thanks .I think there are other ways to solve it |
There is definitely some misalignment here between the |
I solved my problem with externalDependencies (but broke ng serve): // angular.json:
"builder": "@angular-devkit/build-angular:application",
"options": {
"externalDependencies": ["./node/extend.js", "./node/self.js"], But those files (./node/extend.js" and ./node/self.js) are listed in the corresponding package.json/
esbuild reads it and ignores it. But it's not working with esbuild from |
any update on this ? |
same issue using paper.js … the modern esbuild option is just not the right choice if you need packages that aren't using the latest bundling approaches? |
|
Same issue with markdownlint (https://github.com/DavidAnson/markdownlint). works with
|
…ring `ng serve` This commit ensures consistent behavior between `ng build` and `ng serve`. Previously, `ng serve` did not display an error message when Node.js built-in modules were included in browser bundles. By default, Vite replaces Node.js built-ins with empty modules, which can lead to unexpected runtime issues. This update addresses the problem by surfacing clear error messages, providing better developer feedback and alignment between the two commands. Closes: angular#27425
…g `ng serve` This commit ensures consistent behavior between `ng build` and `ng serve`. Previously, `ng serve` did not display an error message when Node.js built-in modules were included in browser bundles. By default, Vite replaces Node.js built-ins with empty modules, which can lead to unexpected runtime issues. This update addresses the problem by surfacing clear error messages, providing better developer feedback and alignment between the two commands. Closes: angular#27425
…g `ng serve` This commit ensures consistent behavior between `ng build` and `ng serve`. Previously, `ng serve` did not display an error message when Node.js built-in modules were included in browser bundles. By default, Vite replaces Node.js built-ins with empty modules, which can lead to unexpected runtime issues. This update addresses the problem by surfacing clear error messages, providing better developer feedback and alignment between the two commands. Closes: angular#27425
…g `ng serve` This commit ensures consistent behavior between `ng build` and `ng serve`. Previously, `ng serve` did not display an error message when Node.js built-in modules were included in browser bundles. By default, Vite replaces Node.js built-ins with empty modules, which can lead to unexpected runtime issues. This update addresses the problem by surfacing clear error messages, providing better developer feedback and alignment between the two commands. Closes: angular#27425
…g `ng serve` This commit ensures consistent behavior between `ng build` and `ng serve`. Previously, `ng serve` did not display an error message when Node.js built-in modules were included in browser bundles. By default, Vite replaces Node.js built-ins with empty modules, which can lead to unexpected runtime issues. This update addresses the problem by surfacing clear error messages, providing better developer feedback and alignment between the two commands. Closes: angular#27425
…g `ng serve` This commit ensures consistent behavior between `ng build` and `ng serve`. Previously, `ng serve` did not display an error message when Node.js built-in modules were included in browser bundles. By default, Vite replaces Node.js built-ins with empty modules, which can lead to unexpected runtime issues. This update addresses the problem by surfacing clear error messages, providing better developer feedback and alignment between the two commands. Closes: angular#27425
…g `ng serve` This commit ensures consistent behavior between `ng build` and `ng serve`. Previously, `ng serve` did not display an error message when Node.js built-in modules were included in browser bundles. By default, Vite replaces Node.js built-ins with empty modules, which can lead to unexpected runtime issues. This update addresses the problem by surfacing clear error messages, providing better developer feedback and alignment between the two commands. Closes: angular#27425
…g `ng serve` This commit ensures consistent behavior between `ng build` and `ng serve`. Previously, `ng serve` did not display an error message when Node.js built-in modules were included in browser bundles. By default, Vite replaces Node.js built-ins with empty modules, which can lead to unexpected runtime issues. This update addresses the problem by surfacing clear error messages, providing better developer feedback and alignment between the two commands. Closes: angular#27425
…g `ng serve` This commit ensures consistent behavior between `ng build` and `ng serve`. Previously, `ng serve` did not display an error message when Node.js built-in modules were included in browser bundles. By default, Vite replaces Node.js built-ins with empty modules, which can lead to unexpected runtime issues. This update addresses the problem by surfacing clear error messages, providing better developer feedback and alignment between the two commands. Closes: angular#27425
…g `ng serve` This commit ensures consistent behavior between `ng build` and `ng serve`. Previously, `ng serve` did not display an error message when Node.js built-in modules were included in browser bundles. By default, Vite replaces Node.js built-ins with empty modules, which can lead to unexpected runtime issues. This update addresses the problem by surfacing clear error messages, providing better developer feedback and alignment between the two commands. Closes: angular#27425 (cherry picked from commit 06f478b)
…g `ng serve` This commit ensures consistent behavior between `ng build` and `ng serve`. Previously, `ng serve` did not display an error message when Node.js built-in modules were included in browser bundles. By default, Vite replaces Node.js built-ins with empty modules, which can lead to unexpected runtime issues. This update addresses the problem by surfacing clear error messages, providing better developer feedback and alignment between the two commands. Closes: angular#27425 (cherry picked from commit 06f478b)
…g `ng serve` This commit ensures consistent behavior between `ng build` and `ng serve`. Previously, `ng serve` did not display an error message when Node.js built-in modules were included in browser bundles. By default, Vite replaces Node.js built-ins with empty modules, which can lead to unexpected runtime issues. This update addresses the problem by surfacing clear error messages, providing better developer feedback and alignment between the two commands. Closes: angular#27425 (cherry picked from commit 06f478b)
…g `ng serve` This commit ensures consistent behavior between `ng build` and `ng serve`. Previously, `ng serve` did not display an error message when Node.js built-in modules were included in browser bundles. By default, Vite replaces Node.js built-ins with empty modules, which can lead to unexpected runtime issues. This update addresses the problem by surfacing clear error messages, providing better developer feedback and alignment between the two commands. Closes: #27425 (cherry picked from commit 06f478b)
Is there a way to tell the angular application builder to stub out all |
same error with "crypto-js" |
Also experiencing this with "pdfjs-dist" |
I got the same error after updating my project to 19 angular.
|
just updated the cli to 19.0.4 and now i can no longer serve my project, getting nodejs builtin usage errors because of pdfjs-dist. i like the intention behind this change but we should at least have some control over it (maybe a compiler option?), since most of the errors will be coming from 3rd party libraries that are outside of our reach. |
@Deku-nattsu downgrade back to 19.0.3. that’s the only solution that’s currently working. |
@Deku-nattsu, if you have a case where an error is shown during |
@alan-agius4 i get the same error with crypto. ng build works, but with ng serve I get the same error. |
@alan-agius4 i am on it |
@dertuerke please file an issue with a minimal reproduction, that we can investigate thanks. |
Here or in an separate thread? |
New issue, please. |
Hi @alan-agius4 I just open a new issue #29080 thanks in advance |
Command
build
Is this a regression?
The previous version in which this bug was not present was
No response
Description
I did not encounter any errors regarding node references during development, but the following errors occurred during build
Minimal Reproduction
default angular.json
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: