-
Notifications
You must be signed in to change notification settings - Fork 258

Description
Describe the bug
When trying to run the default Express.js starter project, the npm install command fails with the error npm error u.toSorted is not a function. This prevents the project from booting and running successfully. It appears the underlying Node.js environment or a dependency is attempting to use the Array.prototype.toSorted() method, which is an ECMAScript 2023 feature, but the WebContainer's Node.js version might be older and not support it.
Link to the blitz that caused the error
Steps to reproduce
- Go to 'https://stackblitz.com/edit/stackblitz-starters-fvhsvqj7?description=&file=README.md&title=Express%20Starter'
- Wait for the project to attempt to install dependencies.
- Observe the error npm error u.toSorted is not a function in the terminal.
- The project fails to boot and run.
Expected behavior
The Express.js starter project should successfully install all dependencies and boot up, allowing the server to run without errors. The expected behavior is for the npm install command to complete successfully, followed by the server starting as indicated by Running start command.
Parity with Local
- I have run the project in my local machine and I could not reproduce the issue.
Screenshots
Platform
Browser name = Chrome
Full version = 109.0.0.0
Major version = 109
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
performance.memory = {
"totalJSHeapSize": 157804385,
"usedJSHeapSize": 138192889,
"jsHeapSizeLimit": 2172649472
}
Hash = 4d9fd228
Additional context
This error suggests a discrepancy between the Node.js version running in the WebContainer for this starter and the JavaScript language features being used by its dependencies. The toSorted() method is an ES2023 feature, implying the current Node.js runtime might be too old to support it. Please ensure the Node.js version in the WebContainer for this starter is up-to-date or that the dependencies are compatible with the existing environment.