Stripe NPM package not working after update - Any ideas??

Hi all,

Since Stripe released an update to their node.js package on Dec 9th, I get the following logs:

"ModuleNotFoundError: Error: Unable to handle the request. Contact the site administrator or view site monitoring logs for more information. "

Error loading web module backend/workflows.jsw: Cannot find module ‘stripe’
Require stack:

  • /user-code/backend/stripe.jsw
  • /user-code/backend/workflows.jsw
  • /user-code/stubmodule-that-does-the-require.js
  • /elementory/node_modules/scoped-require/index.js
  • /elementory/factories.js
  • /elementory/create-app.js
  • /elementory/cloud-grid-runner.js

These errors are triggered even when the page code isn’t making a Stripe API call - For example: making a call to an unrelated function in a web module (“workflows.jsw”) that contains an import statement to import functions from another web module (“stripe.jsw”) that itself has the import statement for the stripe node.js package.

Is this an issue from the Wix package manager not maintaining the connections with external packages? If so, what can I do to avoid this problem?

This breaks my entire application which is obviously no bueno. I’d like to use these external packages but if this is something that might occur then I just cannot take that risk for the sake of convenience.

Please help! Thanks very much!

Ok, so as I try again once I uninstall and reinstall the package - about 30min later - things seem to be working once again???

Do I need to be updating the packages in the package manager as soon as these updates are released so that this doesn’t happen??

If I’m not wrong, the package you install on your wix site does not get auto-updated. You have to uninstall and install to get the most recent version.

Hey Shan,

When I opened the package manager, there is an option to update to whatever version it senses (below)

You know if I should still be uninstalling and installing or is this enough?

Also, do you know if npm has a notification system perchance?

Thanks!

Hi Milos,
You might find this article helpful: “Working with npm Packages” . It has sections on updating and uninstalling an npm package.