Module not found: Error: Can't resolve 'plugins/*/hack'

I'm generating a plugin code using:
node scripts/generate_plugin marina-test
with only hacks enabled.
And I keep getting the following error:
Module not found: Error: Can't resolve 'plugins/marina_test/hack' in '/kibana/src/optimize'

My kibana version is 6.6.2 and I've checked out tags/v6.6.2

What am I missing?

Thank you in advance, Marina

Do you have a <plugin>/public/hack.js file? Imports starting with plugins/marina_test are going to resolve to the public directory of the plugin with the id marina_test.

Also, it seems your plugin might have the id marina-test based on your comment. Double check the spelling of the "name" field in your package.json file, or the id: passed to the plugin constructor in your plugin's index.js file.

Thank you, I had the hack.js file under server/public and even when I've updated the path in index.js file it didn't recognize it...

Ah, public is supposed to be next to server, not within it :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.