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
I have a ts serverless repo with the following tsconfig.json:
tsconfig.json
{ "compilerOptions": { "strict": true, "preserveConstEnums": true, "strictNullChecks": true, "sourceMap": true, "allowJs": true, "target": "es5", "outDir": ".build", "moduleResolution": "node", "lib": ["es2015"], "rootDir": ".", "baseUrl": ".", "paths": { "test-utils/*": ["tests/utils/*"], "~/*": ["src/*"] }, "resolveJsonModule": true } }
When I import tiny-invariant with its default import (import invariant from 'tiny-invariant') , my serverless crashes:
tiny-invariant
import invariant from 'tiny-invariant'
TypeError: (0 , tiny_invariant_1.default) is not a function
But if I import it using named import (import * as invariant from 'tiny-invariant'), it works fine except now my vscode starts complaining:
import * as invariant from 'tiny-invariant'
This expression is not callable. Type 'typeof import(".../node_modules/tiny-invariant/dist/tiny-invariant")' has no call signatures.ts(2349)
Is there something wrong with my configuration?
The text was updated successfully, but these errors were encountered:
I'm having the same problem with a similar setup, is there any update on this?
Sorry, something went wrong.
No branches or pull requests
I have a ts serverless repo with the following
tsconfig.json
:When I import
tiny-invariant
with its default import (import invariant from 'tiny-invariant'
) , my serverless crashes:But if I import it using named import (
import * as invariant from 'tiny-invariant'
), it works fine except now my vscode starts complaining:Is there something wrong with my configuration?
The text was updated successfully, but these errors were encountered: