Are there any issues with using jsonwebtoken with WixStudio? So far, despite the npm package being installed, I’m unable to import it into any .js file.
I get this error Wix IDEr: Cannot find module 'jsonwebtoken' or its corresponding type declarations.ts
I noted that there was no reference to jsonwebtoken being a dependency in the package.js file so I even tried manually adding: "jsonwebtoken": "9.0.2",
Still Wix IDE gives me that error.
Interestingly the standard WixStudio UI code editor doesnt give me an error, but equally the code doesnt run either so clearly there’s a problem.
Does jsonwebtoken 9.0.2 even work with WixStudio? Am I neglecting a step, or am I simply on a wild goose chase?
Try installing earlier versions we had similar issue with mongodb package and report this to support. Also try installing and using the same package in another site to see if there is BUG in your site or if it’s a Wix wide BUG.
Hey there @loeiks
Thanks for your quick reply. To close the loop - this one seems to be user error on my part.
It wasn’t obvious to me that the jsonwebtoken module, though visible on front end (public) .js files, per the code editor, doesn’t actually work in that context. Using it on backend presented no issues at all. Even so - good to know there may be potential issues ahead with mongoDB.
Leaving this here in case newcomers to Velo/WixStudio/JS like me find this helpful.