solidjs / solid-start

SolidStart, the Solid app framework
https://start.solidjs.com
MIT License
5.18k stars 375 forks source link

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

Open bigmistqke opened 7 months ago

bigmistqke commented 7 months ago

Duplicates

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/@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:

  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
ryansolid commented 7 months ago

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