glutinum-org / cli

https://glutinum.net/
59 stars 6 forks source link

fable library module not module error when running from npx package #97

Closed joprice closed 5 months ago

joprice commented 5 months ago

When trying to run test out the npm release of the cli locally on a small package npx @glutinum/cli node_modules/express-basic-auth/express-basic-auth.d.ts (with v0.5.0), I get the following error:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '<home_dir>/.npm/_npx/34b13ab32e657a1a/node_modules/@glutinum/cli/dist/fable_modules/fable-library-js.4.14.0/List.js' imported from <home_dir>/.npm/_npx/34b13ab32e657a1a/node_modules/@glutinum/cli/dist/Program.js

Is something missing in the package or am I missing some setup?

MangelMaxime commented 5 months ago

I think this is because fable_modules has .gitignore file in it and NPM respect .gitignore rules.

While I investigate to make a new release, you can use https://glutinum.net/ which doesn't need a locally installation.

joprice commented 5 months ago

That makes sense. I'll try it out once it's ready. I was able to build locally, so I'm able to generate try glutinum out on some of the libraries I've been writing manual bindings for.