-
-
Notifications
You must be signed in to change notification settings - Fork 880
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
Still hitting strictNullChekcs must be true in tsconfig
#1930
Comments
Can you explain what is the problem? I think the above comment explains it - you need to use strict mode in tsconfig (or at least strictNullChecks) |
@epoberezkin the setting is already in place
|
Difficult to say what’s wrong with your setup. Possibly there is some other tsconfig somewhere that overrides it. Possibly, you’re importing not what you think you are importing. I would try reproducing the issue from a clean slate (when you have no other dependencies than ajv) and see at what point the problem happens as you add extra things. |
Please re-open or open a new issue with a minimal setup where the issue can be debugged. |
Ah - and looking at your npm ls - the minimum typescript version these type utilities can work with is 4.2.3 and you seem to have 2.0.4? |
I had the same problem and the typescript version upgrade fixed it. thanks. |
node_modules/ajv/dist/types/json-schema.d.ts:1:92 - error TS1005: '?' expected. 1 declare type StrictNullChecksWrapper<Name extends string, Type> = undefined extends null ? `strictNullChecks must be true in tsconfig to use ${Name}` : Type; see ajv-validator/ajv#1930 --> using the same typescript version range as angularfire engine/engine.ts:272:7 - error TS2794: Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'? 272 resolve();
I still get the strictNullChecks issue even after giving I get an error message as follows I am using electron along with React typescript as my technologies for this desktop app. I have provided the code for the schema as follows,
|
@Cooper1596 you need to investigate why a different tsconfig is used to compile the code, not the one you edited. |
Unless there is some other case when this error can be shown?… |
Your schema is invalid though |
I am still hitting the error from #1650 and can't pass over it.
Environment:
The ouput of
npm run build
:I am going to close comments on this issue - it is not really defined what this issue was, and the issue may be that you simply have an incorrect schema or that JSONSchemaType has limitations and cannot be used in your case.
Please submit a new issue with a full code sample from a clear repository once you've checked the following:
npm install ajv
may install the previous version because some other dependency uses it - usenpm install ajv@8
and try clean install:rm -rf node_modules && npm I
nullable: true
, that "type" is set in all schemas - in many cases what was reported as JSONSchemaType issue was a user error where their schema was incorrect - it correctly shown compilation error.A simple temporary workaround to use Ajv without using JSONSchemaType - it is optional.
Originally posted by @epoberezkin in #1650 (comment)
The text was updated successfully, but these errors were encountered: