Inventsable / bombino-vue-bare

Template for a barebones CEP panel with Vue-CLI using bombino
0 stars 0 forks source link

ReferenceError: require is not defined #1

Open owiekindisch opened 4 years ago

owiekindisch commented 4 years ago

Hello,

I've installed this template through the bombino generator and started the application with npm run serve. Unfortunately I got a Uncaught ReferenceError: require is not defined at (index):10 at http://localhost:8080/ in my DevTools Console.

Is it supposed to be that node.js not working via browser? How else can I debug my Vue-App?

Inventsable commented 4 years ago

Hello, a few questions:

Inventsable commented 4 years ago

If the panel displays correctly, it is not erroring out. Unfortunately you can't use a modern Chrome browser at localhost:8080, this is just the port to wrap a hot reloading iframe in the extension. You can launch a http://localhost:[debug_port_number] to get devTools, or you can use this component from the basic template to right click and launch the debug window from the panels context menu:

https://github.com/Inventsable/bombino-vue-basic/blob/master/src/components/menus.vue

You can copy/paste it in the repo somewhere, then in the HelloWorld.vue file, import it and define it as a component, then use like <Menus/>. For bare templates I don't include any utilities like this, usage is like so:

https://github.com/Inventsable/bombino-vue-router/blob/master/src/App.vue#L9

owiekindisch commented 4 years ago
  • Do you have NodeJS installed? Have you updated it recently?

Yes I've NodeJS, running v11.13.0

  • What OS are you using?

Using macOS v11.13.0 (Mojave)

  • Do you mean you're manually entering localhost:#### into a Chrome Browser and getting this error?

Correct, I used Chrome Browser (v79.0.3945.130) to manually enter localhost.

Thanks for the menu reference. I guess I misinterpret your demo at https://github.com/Inventsable/vue-cli3-CSInterface and thought it would work via chrome with your node-webkit config. I needed access to the VueDevtools and the chrome extension won't recognize Vue through the .debug server. But I got it in the end with using the global vue-devtools and launch it directly in Adobe applications.