Open vharny opened 1 month ago
With the version 0.7.3
I think the YAML methods are not correctly exported :/
It's probably a typescript problem with moduleResolution
in the tsconfig
but for an Angular 17 project for example the moduleResolution
is node
.
In my Angular project, if I want the import to work, I have to set the moduleResolution
to Bundler
.
I never have any problems with other libraries that have imports with a /
Cannot find module 'codemirror-json-schema/yaml' or its corresponding type declarations. There are types at '[...]/node_modules/codemirror-json-schema/dist/yaml/index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.ts(2307)
Yes I plan to take a look at and fix this this weekend!
@vharny can you let me know if 0.7.5
works for you? it should match everything else in the cm6 ecosystem now in terms of bundling
Hello @acao, Thanks for you quick response!
Sorry, it doesn't work :/ This is my tsconfig file:
{
"compileOnSave": false,
"compilerOptions": {
"downlevelIteration": true,
"incremental": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"target": "ES2022",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2020",
"dom"
],
"module": "esnext",
"baseUrl": "./src",
"useDefineForClassFields": false
}
}
It works when I define paths in the tsconfig file:
"compilerOptions": {
"baseUrl": "./src",
...
"paths": {
"codemirror-json-schema/yaml": ["../node_modules/codemirror-json-schema/dist/yaml"],
...
}
}
Hello,
Thank you for this library, I am really interested in validation / autocompletion JSON Schema YAML.
Currently in the package the functionalities concerning the JSON Schema for YAML are not exported.
Is there a reason why this has not yet been done?