xeokit-convert icon indicating copy to clipboard operation
xeokit-convert copied to clipboard

Error running "node convert2xkt.js -s geometry.gltf -o geometry.xkt - m metadata.json"

Open ifcquery opened this issue 3 years ago • 0 comments

This is the error message:

(node:5620) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (Use node --trace-warnings ... to show where the warning was created) D:\lib\xeokit-convert\src\convert2xkt.js:1 import {parseMetaModelIntoXKTModel} from "./parsers/parseMetaModelIntoXKTModel.js"; ^^^^^^

SyntaxError: Cannot use import statement outside a module at Object.compileFunction (node:vm:352:18) at wrapSafe (node:internal/modules/cjs/loader:1026:15) at Module._compile (node:internal/modules/cjs/loader:1061:27) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10) at Module.load (node:internal/modules/cjs/loader:975:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47 Node.js v17.6.0


Dependencies are installed: xeokit-convert>npm install --only=prod

operating system: Windows 10, 64 bit

ifcquery avatar Mar 06 '22 13:03 ifcquery