I'm trying to create a Zapier app in my monorepo managed by pnpm. I am using the --skip-npm-install
flag so the Zapier CLI can use my node modules. However, the problem is that during the build process, the Zapier CLI is unable to resolve some dependencies. It seems most likely that the issue is with the pnpm symbolic links. Is there any way to resolve this issue?
I have tried by installing those dependencies directly in my zapier project but that only works for few modules
I am using typescript template for this.
package.json
{
"name": "botdojo-zapier",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "pnpm run build && jest --testTimeout 10000 --rootDir ./lib/test",
"build": "pnpm run clean && tsc",
"clean": "rimraf ./lib ./build",
"watch": "pnpm run clean && tsc --watch",
"_zapier-build": "pnpm run build",
"bundle": "pnpm install && zapier build --skip-npm-install --skip-validation",
"bundle-debug": "pnpm install && zapier build --debug --skip-npm-install --skip-validation"
},
"dependencies": {
"@zapier/secret-scrubber": "^1.1.1",
"bluebird": "3.7.2",
"botdojo-client": "workspace:^",
"botdojo-core": "workspace:^",
"botdojo-rpc": "workspace:^",
"cli-highlight": "^2.1.11",
"content-disposition": "0.5.4",
"create-hash": "^1.2.0",
"dotenv": "12.0.4 ",
"form-data": "4.0.0",
"jsonschema": "^1.4.1",
"lodash": "4.17.21",
"lodash.isplainobject": "^4.0.6",
"mime-types": "2.1.35",
"node-abort-controller": "3.1.1",
"node-fetch": "2.6.7",
"oauth-sign": "0.9.0",
"semver": "7.5.2",
"typeorm": "^0.3.16",
"zapier-platform-core": "15.9.1",
"zapier-platform-schema": "15.9.1"
},
"devDependencies": {
"@types/jest": "^26.0.23",
"@types/node": "^14",
"@types/node-fetch": "^2.6.11",
"jest": "^29.6.0",
"rimraf": "^3.0.2",
"typescript": "^4.9.4",
"zapier-platform-cli": "^15.9.1"
},
"private": true
}
tsconfig.json
{
"compilerOptions": {
"target": "es2019",
"module": "commonjs",
"moduleResolution": "node",
"lib": "esnext"],
"outDir": "./lib/src",
"rootDir": "./src",
"strict": false,
"composite": true,
"declaration": true,
"declarationMap": true,
"skipLibCheck": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noImplicitReturns": false,
"noUnusedLocals": false,
"sourceMap": true,
}
}
Error
![](https://uploads-us-west-2.insided.com/zapier-ca/attachment/da0ff86e-5284-4b94-8323-e6dc92732bae.png)