Ironclad / rivet

The open-source visual AI programming environment and TypeScript library
https://rivet.ironcladapp.com
MIT License
2.71k stars 237 forks source link

[Bug]: MongoDB plugin not installable via UI #302

Closed a-rothwell closed 8 months ago

a-rothwell commented 9 months ago

What happened?

A user reported that the mongoDB plugin cannot be installed via the plugins UI when using the prebuilt binaries version. https://github.com/a-rothwell/rivet-plugin-mongodb/issues/2

The user reports that installing from source as described in the docs works fine. https://rivet.ironcladapp.com/docs/user-guide/plugins#installing-plugins-from-source

I was able to repro, perhaps I am bundling/publishing the plugin incorrectly?

What was the expected functionality?

Rivet should be able to install the plugin via the UI successfully

Describe your environment

MacOS, Node 18.19.0, Rivet 1.7.4 from prebuilt binaries

Relevant log output

Installing plugin: MongoDB...
Checking for plugin updates: rivet-plugin-mongodb@latest
Removing existing plugin: rivet-plugin-mongodb@latest
Plugin not found locally or needs reinstall: rivet-plugin-mongodb@latest, downloading from NPM...
Downloading plugin tarball from NPM: https://registry.npmjs.org/rivet-plugin-mongodb/-/rivet-plugin-mongodb-0.0.3.tgz
Downloaded plugin tarball from NPM: https://registry.npmjs.org/rivet-plugin-mongodb/-/rivet-plugin-mongodb-0.0.3.tgz
Installing NPM dependencies...
 ENOENT  not found: node

This error happened while installing a direct dependency of /Users/ml/Library/Application Support/com.ironcladapp.rivet/plugins/rivet-plugin-mongodb-latest/package

pnpm: not found: node
    at getNotFoundError (/snapshot/dist/pnpm.cjs)
    at Function.whichSync [as sync] (/snapshot/dist/pnpm.cjs)
    at getCommandAbsolutePathSync (/snapshot/dist/pnpm.cjs)
    at Object.sync (/snapshot/dist/pnpm.cjs)
    at getSystemNodeVersionNonCached (/snapshot/dist/pnpm.cjs)
    at getSystemNodeVersionNonCached (/snapshot/dist/pnpm.cjs)
    at checkPackage (/snapshot/dist/pnpm.cjs)
    at packageIsInstallable (/snapshot/dist/pnpm.cjs)
    at resolveAndFetch (/snapshot/dist/pnpm.cjs)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Progress: resolved 1, reused 0, downloaded 0, added 0

Error installing plugin: Error installing plugin dependencies: rivet-plugin-mongodb@latest:

Relevant screenshots

No response

Code of Conduct

a-rothwell commented 9 months ago

Could it be because I am missing this in my package.json

  "rivet": {
    "skipInstall": true
  }
a-rothwell commented 8 months ago

That was the reason. It is currently the best practice to bundle all dependencies in with the plugin and not install dependencies at install time.