-
Notifications
You must be signed in to change notification settings - Fork 92
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
Running arm64 REH build exits with MODULE_NOT_FOUND error #5775
Comments
I just ran this in Docker while emulating x86_64 and it worked.
|
This is where the error is being raised, from
This source is compiled from positron/src/bootstrap-meta.ts Lines 16 to 19 in 460beec
|
There's build tooling that is supposed to insert the positron/build/lib/inlineMeta.ts Lines 26 to 36 in 460beec
However, it isn't running or isn't working, as the working version also has this placeholder. The difference between the working version (Linux) and the broken one (macOS) is the presence of |
This change addresses an issue in which Positron Server doesn't start due to an error like this one: ``` (node:11206) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (Use `node --trace-warnings ...` to show where the warning was created) /home/ubuntu/vscode-reh-web-linux-x64/out/server-main.js:26 export function __extends(d, b) { ^^^^^^ SyntaxError: Unexpected token 'export' at wrapSafe (node:internal/modules/cjs/loader:1378:20) at Module._compile ``` The problem was caused by an incompletely merged line in the initial 1.95 merge, which caused a cascade of silent failures that led to `package.json` being omitted from the `reh-web` bundle, which led to the above failure since `package.json` was responsible for setting `"type": "module"` as noted above. The fix is just to update the line to match what it was before the merge: https://github.com/posit-dev/positron/blob/fa567b23598d7f91eab1f2aa182ae8b1e8b50099/build/gulpfile.reh.js#L378-L383 Addresses, coincidentally, #5775, which is where this error was first spotted. After the change, it ought to be possible to run `./positron-server` without error. E.g.: ``` ./positron-server --version Positron: 2025.01.1 build 4 Positron SHA: 9f520e6 Code OSS: 1.96.0 Arch: arm64 ```
This change addresses an issue in which Positron Server doesn't start due to an error like this one: ``` (node:11206) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (Use `node --trace-warnings ...` to show where the warning was created) /home/ubuntu/vscode-reh-web-linux-x64/out/server-main.js:26 export function __extends(d, b) { ^^^^^^ SyntaxError: Unexpected token 'export' at wrapSafe (node:internal/modules/cjs/loader:1378:20) at Module._compile ``` The problem was caused by an incompletely merged line in the initial 1.95 merge, which caused a cascade of silent failures that led to `package.json` being omitted from the `reh-web` bundle, which led to the above failure since `package.json` was responsible for setting `"type": "module"` as noted above. The fix is just to update the line to match what it was before the merge: https://github.com/posit-dev/positron/blob/fa567b23598d7f91eab1f2aa182ae8b1e8b50099/build/gulpfile.reh.js#L378-L383 Addresses, coincidentally, #5775, which is where this error was first spotted. After the change, it ought to be possible to run `./positron-server` without error. E.g.: ``` ./positron-server --version Positron: 2025.01.1 build 4 Positron SHA: 9f520e6 Code OSS: 1.96.0 Arch: arm64 ```
This change addresses an issue in which Positron Server doesn't start due to an error like this one: ``` (node:11206) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (Use `node --trace-warnings ...` to show where the warning was created) /home/ubuntu/vscode-reh-web-linux-x64/out/server-main.js:26 export function __extends(d, b) { ^^^^^^ SyntaxError: Unexpected token 'export' at wrapSafe (node:internal/modules/cjs/loader:1378:20) at Module._compile ``` The problem was caused by an incompletely merged line in the initial 1.95 merge, which caused a cascade of silent failures that led to `package.json` being omitted from the `reh-web` bundle, which led to the above failure since `package.json` was responsible for setting `"type": "module"` as noted above. The fix is just to update the line to match what it was before the merge: https://github.com/posit-dev/positron/blob/fa567b23598d7f91eab1f2aa182ae8b1e8b50099/build/gulpfile.reh.js#L378-L383 Addresses, coincidentally, #5775, which is where this error was first spotted. After the change, it ought to be possible to run `./positron-server` without error. E.g.: ``` ./positron-server --version Positron: 2025.01.1 build 4 Positron SHA: 9f520e6 Code OSS: 1.96.0 Arch: arm64 ```
Note that this fix went into the 2025.01 branch so should be verified on the next 2025.01 build. |
System details:
Positron and OS details:
main
on Linux arm64 and MacInterpreter details:
n/a
Describe the issue:
I haven't been able to try this on Linux x86_64 but a local REH build fails to run from what looks like import problems from the 1.95.0 merge.
Steps to reproduce the issue:
npm run gulp vscode-reh-web-darwin-arm64
andnpm run vscode-reh-web-linux-arm64
)positron-server
Expected or desired behavior:
No errors about finding modules
Were there any error messages in the UI, Output panel, or Developer Tools console?
The text was updated successfully, but these errors were encountered: