Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

VS Code extension support for pnpm installed postgrestools#377

mattpetersen started this conversation inIdeas
Discussion options

TheVS Code extension, upon startup,copies the postgrestools binary to a temporary location, and executes it from there. This is to prevent locking the file on the user's system while the VS Code extension is running.

✅ This works if the binary were installed viacurl, since it downloads a standalone executable file.
✅ It also works if the binary were installed vianpm, anotherrecommended installation method.
❌ However, if the binary were installed viapnpm, copying the binary causes it to fail to execute from its new location.

The error we see is the following:

node:internal/modules/cjs/loader:1228  throw err;  ^Error: Cannot find module '~/Library/Application Support/Code/User/globalStorage/supabase.postgrestools/tmp-bin/global/5/.pnpm/@postgrestools+postgrestools@0.6.1/node_modules/@postgrestools/postgrestools/bin/postgrestools'    at Function._resolveFilename (node:internal/modules/cjs/loader:1225:15)    at Function._load (node:internal/modules/cjs/loader:1055:27)    at TracingChannel.traceSync (node:diagnostics_channel:322:14)    at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)    at node:internal/main/run_main_module:36:49 {  code: 'MODULE_NOT_FOUND',  requireStack: []}Node.js v22.14.0

We might be able to usepnpm link, although it would make the exit cleanup more involved since we'd have to remove the localnode_modules folder.

Another solution would be to copy the executable to the same directory in which we found it, just with a new name. A new name is being used already, so this would be a pretty minimal change. We'd want to fail of course if such a file already exists.

I'm taking a look at this now - may open an MR tonight. Cheers!

You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Ideas
Labels
None yet
1 participant
@mattpetersen

[8]ページ先頭

©2009-2025 Movatter.jp