Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Support for uploading Zapier integrations of type Module #902

Open
arcticfly opened this issue Oct 24, 2024 · 0 comments

Comments

@arcticfly
Copy link

Current Behavior

After running zapier init --template=typescript zapier-app, I've modified the following two files:

package.json

...
"type": "module",
...

and

tsconfig.json

...
"module": "ESNext",
"moduleResolution": "Bundler",
...

When I now run zapier validate, I see an error related to running the zapier cli with a project of type module:

zapier validate
Validating project locally
(node:64821) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
 ›   Error: require() of ES Module /path/test-zapier-app/example-app/index.js from
 ›   /Users/user/.nvm/versions/node/v21.6.2/lib/node_modules/zapier-platform-cli/src/utils/local.js not supported.
 ›   index.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
 ›   Instead either rename index.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in
 ›   /path/test-zapier-app/example-app/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
 ›
 ›
 ›   re-run this command with `--debug` for more info

Other zapier CLI commands result in similar errors.

Desired Behavior / Feature Request

All zapier CLI commands work with projects of type "module".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant