solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

[Bug?]: error while importing module, related to `.` in path-name

Open bigmistqke opened this issue 10 months ago • 1 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Current behavior 😯

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/@[email protected][email protected]/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/@[email protected][email protected]/node_modules/@tensorflow/tfjs-node/lib/napi-v8/tfjs_binding.node
  Reason: tried: '/Users/bigmistqke/Documents/GitHub/start-bug/node_modules/.pnpm/@[email protected][email protected]/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:

  1. clone https://github.com/bigmistqke/start-bug
  2. pnpm install
  3. 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 🌎

MacOS M1

bigmistqke avatar Apr 07 '24 22:04 bigmistqke

This isn't to do with routing. This is path resolution to do with bundling/dev server.

ryansolid avatar Apr 08 '24 20:04 ryansolid