When trying to import @tensorflow/tfjs-node on the server I get the following error:
12:19:49 AM [vite] Error when evaluating SSR module /src/server/query.ts: failed to import "@tensorflow/tfjs-node"
|- Error: dlopen(/Users/bigmistqke/Documents/GitHub/start-bug/node_modules/.pnpm/@tensorflow+tfjs-node@4.17.0_seedrandom@3.0.5/node_modules/@tensorflow/tfjs-node/lib/napi-v8/tfjs_binding.node, 0x0001): Library not loaded: @loader_path/../../deps/lib/libtensorflow.2.dylib
Referenced from: <5C0AA5B7-B5A7-3035-A048-D9A2501EB16D> /Users/bigmistqke/Documents/GitHub/start-bug/node_modules/.pnpm/@tensorflow+tfjs-node@4.17.0_seedrandom@3.0.5/node_modules/@tensorflow/tfjs-node/lib/napi-v8/tfjs_binding.node
Reason: tried: '/Users/bigmistqke/Documents/GitHub/start-bug/node_modules/.pnpm/@tensorflow+tfjs-node@4.17.0_seedrandom@3.0.5/node_modules/@tensorflow/tfjs-node/lib/napi-v8/../../deps/lib/libtensorflow.2.dylib' (no such file), '/usr/local/lib/libtensorflow.2.dylib' (no such file), '/usr/lib/libtensorflow.2.dylib' (no such file, not in dyld cache)
The library looks for file libtensorflow.2.dylib but the file is actually called libtensorflow.2.7.0.dylib.
The same error occurs with the file libtensorflow_framework.2.7.0.dylib
Expected behavior 🤔
I expect the file to get imported. With vanilla nodejs there is no issue.
Steps to reproduce 🕹
Steps:
clone https://github.com/bigmistqke/start-bug
pnpm install
pnpm dev
(Another unrelated error happens on stackblitz)
Context 🔦
reeeeeee mentioned a similar bug happened with route-paths, so maybe they are related.
Duplicates
Latest version
Current behavior 😯
When trying to import
@tensorflow/tfjs-node
on the server I get the following error:The library looks for file
libtensorflow.2.dylib
but the file is actually calledlibtensorflow.2.7.0.dylib
. The same error occurs with the filelibtensorflow_framework.2.7.0.dylib
Expected behavior 🤔
I expect the file to get imported. With vanilla nodejs there is no issue.
Steps to reproduce 🕹
Steps:
https://github.com/bigmistqke/start-bug
pnpm install
pnpm dev
(Another unrelated error happens on stackblitz)
Context 🔦
reeeeeee mentioned a similar bug happened with route-paths, so maybe they are related.
Your environment 🌎