We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
test.ts
import { Ok, Result } from 'ts-results' let result: Result<number, string> = Ok(1) console.log(result)
compile with esbuild src/test.ts --bundle --platform=node --minify --define:import.meta.vitest=undefined --outdir=dist --outbase=src
esbuild src/test.ts --bundle --platform=node --minify --define:import.meta.vitest=undefined --outdir=dist --outbase=src
run fails
node dist/test.js node:internal/modules/cjs/loader:1073 throw err; ^ Error: Cannot find module 'tslib' Require stack: - node dist/test.js node:internal/modules/cjs/loader:1073 throw err; ^ Error: Cannot find module 'tslib' Require stack: - /home/ubuntu/dev/ts-results-error/dist/test.js at Module._resolveFilename (node:internal/modules/cjs/loader:1070:15) at Module._load (node:internal/modules/cjs/loader:923:27) at Module.require (node:internal/modules/cjs/loader:1137:19) at require (node:internal/modules/helpers:121:18) at /home/ubuntu/dev/ts-results-error/dist/test.js:1:850 at /home/ubuntu/dev/ts-results-error/dist/test.js:1:621 at /home/ubuntu/dev/ts-results-error/dist/test.js:1:767 at /home/ubuntu/dev/ts-results-error/dist/test.js:1:216 at Object.<anonymous> (/home/ubuntu/dev/ts-results-error/dist/test.js:1:937) at Module._compile (node:internal/modules/cjs/loader:1255:14) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/ubuntu/dev/ts-results-error/dist/test.js' ] } Node.js v20.3.0/dist/test.js at Module._resolveFilename (node:internal/modules/cjs/loader:1070:15) at Module._load (node:internal/modules/cjs/loader:923:27) at Module.require (node:internal/modules/cjs/loader:1137:19) at require (node:internal/modules/helpers:121:18) at /home/ubuntu/dev/ts-results-error/dist/test.js:1:850 at /home/ubuntu/dev/ts-results-error/dist/test.js:1:621 at /home/ubuntu/dev/ts-results-error/dist/test.js:1:767 at /home/ubuntu/dev/ts-results-error/dist/test.js:1:216 at Object.<anonymous> (/home/ubuntu/dev/ts-results-error/dist/test.js:1:937) at Module._compile (node:internal/modules/cjs/loader:1255:14) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/ubuntu/dev/ts-results-error/dist/test.js' ] } Node.js v20.3.0
The text was updated successfully, but these errors were encountered:
+1, this was closed in #32 but it's still an issue
Sorry, something went wrong.
Duplicate of #37 ? As far as I know, fixed but not released.
I've ended up using the ts-result-es fork mentioned in one of the above MRs: https://www.npmjs.com/package/ts-results-es
ts-result-es
No branches or pull requests
test.ts
compile with
esbuild src/test.ts --bundle --platform=node --minify --define:import.meta.vitest=undefined --outdir=dist --outbase=src
run fails
The text was updated successfully, but these errors were encountered: