Description
I'm trying to run oxc-parser in an aarch64
machine, running on Amazon EC2 (with ubuntu).
It fails with the error:
Illegal instruction (core dumped)
The following minimal code produces the error:
package.json
{
"name": "testoxc",
"type": "module",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"main": "node index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"oxc-parser": "^0.69.0"
}
}
index.js (copied from the npm package instructions):
import oxc from 'oxc-parser';
const code = 'const url: String = /* 🤨 */ import.meta.url;';
// File extension is used to determine which dialect to parse source as.
const filename = 'test.tsx';
const result = oxc.parseSync(filename, code);
// or `await oxc.parseAsync(filename, code)`
// An array of errors, if any.
console.log(result.errors);
// AST and comments.
console.log(result.program, result.comments);
// ESM information - imports, exports, `import.meta`s.
console.log(result.module);
It resolves and installs node_modules/@oxc-parser/binding-linux-arm64-gnu
.
The same code works fine on my arm64 (macOS) machine (via binding-darwin-arm64
).
Testing various versions, I discovered that it stopped working in version 0.60.0
(it worked with 0.58.1
.
Metadata
Metadata
Assignees
Labels
No labels