Skip to content

Conversation

renanbym
Copy link

@renanbym renanbym commented Jul 1, 2025

Context
The node-inspect-extracted package was recently updated to version 3.1.0 to support Node.js 24. As part of this update, the package now includes direct references to several Node.js native globals such as Atomics, Math, Proxy, and Reflect.

This change introduces a problem for projects using @fastly/js-compute. When bundling and compiling code into main.wasm using the js-compute-runtime, the runtime is unable to process features like Atomics, leading to build-time failures.

Reproduction Steps
To reproduce the issue:

Create a minimal Fastly Compute@Edge app using TypeScript.

Install compute-js-opentelemetry@latest (which brings in node-inspect-extracted@^3.1.0 as a transitive dependency).

Run your build using webpack or esbuild.

Attempt to compile the bundle into main.wasm.

You'll encounter a compilation error similar to:
Captura de ecrã 2025-07-01, às 13 49 08

This happens because js-compute-runtime cannot handle certain modern Node.js features like Atomics or deep Reflect usage.

Resolution
Until js-compute-runtime officially supports these features, we are pinning node-inspect-extracted to the last known working version (3.0.1) to avoid build issues and ensure stability in environments relying on Fastly's wasm-based runtime.

Changes
Added a direct dependency on [email protected] in package.json to lock the version used during installs.

Notes
Once js-compute-runtime adds support for Atomics and related features, we can safely upgrade this dependency again. This fix is a temporary but necessary measure to prevent production build failures

@renanbym
Copy link
Author

renanbym commented Jul 7, 2025

hey @harmony7 could you take a look at the PR?

@renanbym
Copy link
Author

renanbym commented Jul 9, 2025

@acme , @ArisaRoong could you take a look at the PR?

@harmony7
Copy link
Member

Thanks for this, I can look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants