-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Build error when using with pnpm and nestjs #92
Comments
Same mistake. |
instead of using es6 import: use require: |
FYI I'm getting this error using esbuild, since you're already using typescript and tsc, this feels like an easy fix. Just update your tsconfig to output a .d.ts declaration file to dist/index.d.ts and update "types" in package.json to point to the declaration file. Are you willing to accept a pull request for this? I'm happy to submit send one over. |
Could this PR be merged? Seems like a simple change to massively improve the usability of the library. |
Hi @rajivkr, I saw your issue about the build error when using the package with pnpm and NestJS. I've forked the original project and am working on fixing such issues. My fork only publishes JavaScript files and includes type declaration files, which should resolve the TypeScript errors you're encountering. Check it out here:
Give it a try and let me know if it helps! Best, |
Hello, I am getting this error, when I building my nestjs application using pnpm.
`node_modules/.pnpm/[email protected]/node_modules/csv-writer/src/index.ts:11:14 - error TS2742: The inferred type of 'createArrayCsvStringifier' cannot be named without a reference to '.pnpm/[email protected]/node_modules/csv-writer/src/lib/csv-stringifiers/array'. This is likely not portable. A type annotation is necessary.
11 export const createArrayCsvStringifier = (params: ArrayCsvStringifierParams) =>
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/[email protected]/node_modules/csv-writer/src/index.ts:14:14 - error TS2742: The inferred type of 'createObjectCsvStringifier' cannot be named without a reference to '.pnpm/[email protected]/node_modules/csv-writer/src/lib/csv-stringifiers/object'. This is likely not portable. A type annotation is necessary.
14 export const createObjectCsvStringifier = (params: ObjectCsvStringifierParams) =>
~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/[email protected]/node_modules/csv-writer/src/index.ts:17:14 - error TS2742: The inferred type of 'createArrayCsvWriter' cannot be named without a reference to '.pnpm/[email protected]/node_modules/csv-writer/src/lib/csv-writer'. This is likely not portable. A type annotation is necessary.
17 export const createArrayCsvWriter = (params: ArrayCsvWriterParams) =>
~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/[email protected]/node_modules/csv-writer/src/index.ts:20:14 - error TS2742: The inferred type of 'createObjectCsvWriter' cannot be named without a reference to '.pnpm/[email protected]/node_modules/csv-writer/src/lib/csv-writer'. This is likely not portable. A type annotation is necessary.
20 export const createObjectCsvWriter = (params: ObjectCsvWriterParams) =>
~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/[email protected]/node_modules/csv-writer/src/index.ts:20:14 - error TS2742: The inferred type of 'createObjectCsvWriter' cannot be named without a reference to '.pnpm/[email protected]/node_modules/csv-writer/src/lib/lang/object'. This is likely not portable. A type annotation is necessary.
20 export const createObjectCsvWriter = (params: ObjectCsvWriterParams) =>
~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/[email protected]/node_modules/csv-writer/src/lib/csv-writer-factory.ts:39:5 - error TS2742: The inferred type of 'createObjectCsvWriter' cannot be named without a reference to '.pnpm/[email protected]/node_modules/csv-writer/src/lib/lang/object'. This is likely not portable. A type annotation is necessary.
39 createObjectCsvWriter(params: ObjectCsvWriterParams) {`
The text was updated successfully, but these errors were encountered: