Skip to content
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

Unable to run compile-schemas script #467

Open
X-Coder opened this issue Dec 15, 2024 · 1 comment
Open

Unable to run compile-schemas script #467

X-Coder opened this issue Dec 15, 2024 · 1 comment

Comments

@X-Coder
Copy link

X-Coder commented Dec 15, 2024

Its the first time I try to use vjsf, I just set up a new environment using the steps described in your app-examples readme.

But when I run the compile script I get the following error and I am unable to fix it:

npm run compile-schemas

file:///opt/dev-env/frontend-vjsf/node_modules/@koumoul/vjsf-compiler/node_modules/@json-layout/core/src/compile/skeleton-node.js:2
import { normalizeLayoutFragment, isSwitchStruct, isGetItemsExpression, isGetItemsFetch, isItemsLayout, getSchemaFragmentType, isCompositeLayout, childIsCompObject } from '@json-layout/vocabulary'
^^^^^^^^^^^^^^^^^
SyntaxError: The requested module '@json-layout/vocabulary' does not provide an export named 'childIsCompObject'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:177:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:260:5)
at async onImport.tracePromise.proto (node:internal/modules/esm/loader:543:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)

I use Node.js v22.11.0 and the following basic package.json

{
  "name": "frontend-vjsf",
  "private": true,
  "type": "module",
  "version": "0.0.0",
  "scripts": {
    "dev": "vite",
    "compile-schemas": "node scripts/compile-schemas.js",
    "build": "run-p type-check \"build-only {@}\" --",
    "preview": "vite preview",
    "build-only": "vite build",
    "type-check": "vue-tsc --build --force",
    "lint": "eslint . --fix"
  },
  "dependencies": {
    "@koumoul/vjsf": "^3.6.0",
    "@koumoul/vjsf-compiler": "^0.3.0",
    "@koumoul/vjsf-markdown": "^0.3.1",
    "@mdi/font": "7.4.47",
    "core-js": "^3.39.0",
    "roboto-fontface": "*",
    "vue": "^3.5.13",
    "vuetify": "^3.7.5"
  },
  "devDependencies": {
    "@eslint/js": "^9.14.0",
    "@tsconfig/node22": "^22.0.0",
    "@types/node": "^22.9.0",
    "@vitejs/plugin-vue": "^5.1.4",
    "@vue/eslint-config-typescript": "^14.1.3",
    "@vue/tsconfig": "^0.5.1",
    "eslint": "^9.14.0",
    "eslint-plugin-vue": "^9.30.0",
    "npm-run-all2": "^7.0.1",
    "sass": "1.77.8",
    "sass-embedded": "^1.77.8",
    "typescript": "~5.6.3",
    "unplugin-fonts": "^1.1.1",
    "unplugin-vue-components": "^0.27.2",
    "unplugin-vue-router": "^0.10.0",
    "vite": "^5.4.10",
    "vite-plugin-vuetify": "^2.0.3",
    "vue-router": "^4.4.0",
    "vue-tsc": "^2.1.10"
  }
}

Is something broken or did I miss a step?

@albanm
Copy link
Member

albanm commented Dec 16, 2024

Ah yes, sorry. I think this dependency problem should be fixed with latest @koumoul/vjsf-compiler release.

FYI when starting with vjsf, it is more logical not to bother with the build-time compilation and to simply use the runtime mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants