Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Tests running under Node don't know they're running in Node #235

Open
reillyeon opened this issue Nov 14, 2023 · 0 comments
Open

Tests running under Node don't know they're running in Node #235

reillyeon opened this issue Nov 14, 2023 · 0 comments

Comments

@reillyeon
Copy link
Contributor

In trying to test #233 I discovered that TensorFlow.js is not automatically detecting that it is running in the Node environment when running tests. This seems to be because webpack is building in process/browser.js, which overrides the process global in a way that hides that the environment is Node. This is useful when running libraries that expect to run in browser but breaks libraries that need to know, like TensorFlow. This seems like a Webpack 4 issue and upgrading to Webpack 5 seems to fix the problem but results in new problems.

At this point I have discovered too many yaks and would like someone more familiar with this library to take a look. The end result might be that we need to build Node and non-Node versions of the bundle. I'm not familiar with the solutions in this space.

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

No branches or pull requests

1 participant