ESM plugins don't work with the Begin CLI using begin dev. They do, however, work when using sandbox directly.
Steps to reproduce:
Using @brianleroux 's S3 upload repo at https://github.com/brianleroux/enhance-example-s3-upload .
- clone the repo
git clone https://github.com/brianleroux/enhance-example-s3-upload.git
- install deps
npm i
- run
begin dev
- install sandbox
npm i @architect/sandbox
- run sandbox
npx sandbox
You should see the following error when running begin dev but no error running npx sandbox:
Error: Plugin error:
- Unable to load plugin 's3': Invalid host defined options
at getPluginModules (/snapshot/cli/node_modules/@architect/inventory/src/config/pragmas/plugins.js)
at getPluginModulesCallbackified (node:util:306:5)
at architectInventory (/snapshot/cli/node_modules/@architect/inventory/src/index.js)
at action (/snapshot/cli/src/commands/dev/index.js)
at runCommand (/snapshot/cli/src/commands/index.js)
at begin (/snapshot/cli/src/index.js)
at Object.<anonymous> (/snapshot/cli/src/index.js)
at Module._compile (pkg/prelude/bootstrap.js:1926:22)
at Module._extensions..js (node:internal/modules/cjs/loader:1166:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
➜ enhance-example-s3-upload git:(main) ✗
ESM plugins don't work with the Begin CLI using
begin dev. They do, however, work when usingsandboxdirectly.Steps to reproduce:
Using @brianleroux 's S3 upload repo at https://github.com/brianleroux/enhance-example-s3-upload .
git clone https://github.com/brianleroux/enhance-example-s3-upload.gitnpm ibegin devnpm i @architect/sandboxnpx sandboxYou should see the following error when running
begin devbut no error runningnpx sandbox: