th0rgall / voc-enhancer

Show translations in the word game of vocabulary.com. Add words with context from any site.
MIT License
12 stars 3 forks source link

Load unpacked error #15

Closed eduOS closed 3 years ago

eduOS commented 3 years ago

I built the extension from the 0.4.7 release and loaded the ./dist/chrome to the chrome extension but the following error occurs:

Uncaught ReferenceError: VocAPI is not defined

image

I have installed the voc-api under the repo directory and no errors showed up after I entered make to build the extension dist.

Any suggestions?

th0rgall commented 3 years ago

Hey @eduOS , it seems the make is a remnant of an old version. I believe it was substituted with a webpack setup. As you can see, this package was not left in an ideal state, without development instructions, and has been unmaintained for two years. I don't have time to fix that now unfortunately.

But I could get the project to compile again here with the following command:

npx webpack --mode=development

This should take care of the voc-api import here https://github.com/th0rgall/voc-enhancer/blob/6f22c0d6f5e149f85515b7ff6ba7ce9fec6b56aa/src/background.js#L3-L4.

Thus: try to (1) npm install, (2) use webpack as above for development, this uses the following config https://github.com/th0rgall/voc-enhancer/blob/master/webpack.config.js instead of make. Hope that works!