Closed mohammadraufzahed closed 1 year ago
Thanks @mohammadraufzahed. What fix are you proposing?
Same error with Node version: 16.16.0
Changing vite config plugins section and disabling ssr option kinda resolves application start error. From:
plugins: [analog()],
to:
plugins: [analog({ ssr: false })],
Node versions 16.17.0 and 18.13.0+ have been verified as working
I tested with node 18 but it faild
Getting the same issue on Node 18.16
Same error with Node version: 16.16.0
Changing vite config plugins section and disabling ssr option kinda resolves application start error. From:
plugins: [analog()],
to:plugins: [analog({ ssr: false })],
This solution worked for me on Node 18.16 using Angular 16 pre-release
Might be related to and resolved by this effort: https://github.com/angular/angular/pull/50247
Hi, I can confirm that angular/angular#50247 will allow to drop the usage of xhr2
(as a developer preview though)
Try this with the latest release and see if its still an issue
Please provide the environment you discovered this bug in.
Device and Software Specifications
Which area/package is the issue in?
create-analog
Description
After installing Node.js v19.8.1 and running the '@analogjs/platform' server, an error occurs with the message "require is not defined" in the 'xhr2' module. This error is triggered in the 'xhr2.js' file at line 119, causing a reference error. This issue prevents the server from running correctly and accessing the endpoints.
Please provide the exception or error you saw
Other information
Reproduce
I would be willing to submit a PR to fix this issue