You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to build a zapier project using "type": "module" in the package.json file. We need this to be able to reference ESM dependencies. The code builds, but when we run zapier push we get the error below:
zapierwrapper.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.
Reproduction Steps
Create a new integration with zapier init
Set "type": "module" in the package.json
Run zapier push
Zapier Platform version
15.5.3
Node.js version
18.5.0
Your Operating System
darwin-arm64
npm/yarn version
9.6.7
App ID
No response
More Details
No response
The text was updated successfully, but these errors were encountered:
Not sure if this is directly related. But I tried to add axios@1.6.7 as a dependency, and was finding that zapier push is not including all the files properly.
Yet, axios@0.28.0 works find. The main difference that I can see between the 2 versions is that 1.6.7 uses the import/export syntax, whereas 0.28.0 is the old school require function call.
I guess the smart dependency detection is not working with import/export syntax used by the node_modules?
Using import/export in typescript is fine as currently they get transpiled into require calls. But if the packages in node_modules themselves are using import/export, then things seems to be broken.
Bug Description
We are trying to build a zapier project using
"type": "module"
in thepackage.json
file. We need this to be able to reference ESM dependencies. The code builds, but when we runzapier push
we get the error below:Reproduction Steps
"type": "module"
in the package.jsonZapier Platform version
15.5.3
Node.js version
18.5.0
Your Operating System
darwin-arm64
npm/yarn version
9.6.7
App ID
No response
More Details
No response
The text was updated successfully, but these errors were encountered: