Closed SavoInfostream closed 1 year ago
Thank you for reaching out! Can you show me how you are implementing the plugin? Make sure you are using customElementJetBrainsPlugin
and not generateJetBrainsWebTypes
.
import { customElementJetBrainsPlugin } from "custom-element-jet-brains-integration";
const options = {
};
// module.exports = {
// outdir: "./wwwroot",
// plugins: [
// customElementJetBrainsPlugin(options)
// ]
// }
export default {
outdir: "./",
plugins: [
customElementJetBrainsPlugin(options)
]
};
I debug it and it was caused by BOM in package.json. Something like this happened to me on Windows a few times.
Can you help me with configuring this properly;
Here's my script entry:
Which results in: You are using es module syntax in a config loaded as CommonJS module. Use require/module.exports syntax, or load the file as es module by using the .mjs file extension or by setting type="module" in your package.json.
Setting extension to
.mjs
I get:Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'cem-plugin-jet-brains-ide-integration' imported from C:...\custom-elements-manifest.config.mjs
And finally changing the import name to)
at file:///C:.../node_modules/custom-element-jet-brains-integration/dist/index.js:247:24
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Which is this line:
custom-element-jet-brains-integration
I get: SyntaxError: Unexpected token in JSON at position 0 at JSON.parse (var packageJson = JSON.parse(fs2.readFileSync("package.json", "utf8"));
What to do?