ts-force
ts-force copied to clipboard
Error: Cannot find module '../../ts-force'
I am using ts-force-gen in a repository that is using rush/pnpm for handling dependencies and it fails with
Error: Cannot find module '../../ts-force'
I noticed there are indeed relative imports to import the ts-force module. They work locally in development and apparently also with npm because it places the dependency in the same relative position. In order to support all environments these relative imports should be changed to an absolute import of ts-force.
exact same issue here, also using pnpm
requireStack: [
'/Users/dacloutier/Documents/vscode/com.go2.wtj.e2e/node_modules/.pnpm/[email protected]/node_modules/ts-force-gen/build/sObjectGenerator.js',
'/Users/dacloutier/Documents/vscode/com.go2.wtj.e2e/node_modules/.pnpm/[email protected]/node_modules/ts-force-gen/build/index.js'
]
just replacing with
const ts_force_1 = require("ts-force");
worked for pnpm, no idea if this would have impact on npm and the others.