store.js icon indicating copy to clipboard operation
store.js copied to clipboard

ReferenceError: store is not defined on a certain url

Open chuckplantain opened this issue 6 years ago • 3 comments

I was trying to use this and was successful in all cases (other urls) except one. I paste any of the minified versions of this library on this url:

  • https://www.audiusa.com/ and find that: store is not defined.

browser: Firefox dev edition

Note: works on all other urls I have tested.

screen shot 2018-05-03 at 2 41 09 pm

chuckplantain avatar May 03 '18 18:05 chuckplantain

Sorry for the noise, I had a breakpoint on, oops. Thanks for the lib

chuckplantain avatar May 03 '18 19:05 chuckplantain

over reacted, still an issue

chuckplantain avatar May 03 '18 19:05 chuckplantain

Yup the installation guide is trash.

The only thing that worked for me in an actual live website which isn't built for this plugin, was to:

require(['/_assets/vendor/store-js/dist/store.modern.min.js'], function(result) {
     window.storage=result;
     if (typeof(window.storageReadyCallback)==='function') window.storageReadyCallback(window.storage);
});

The script can be changed out with "legacy" or "everything", but demands the min.js files, since this system makes assumptions about the context of your require.js library setup.

I have yet to see if the rest of the plugin functions properly. But I would assume it does. Here's hoping.

ensemblebd avatar Jun 03 '18 22:06 ensemblebd