NPM packages not working

Suddenly none of my installed npm packages are working. The code editor is flagging them with errors:

Is anyone else having the same issue?

3 Likes

Hi, @Miguel_Galvez !!

Just to be sure, please check if npm is installed. Could it have been removed or disappeared after installation? :upside_down_face:

I checked. They are all there.

I just checked, and I saw the same red wavy line in my environment as well. :open_mouth:

Good to know I am not alone! :rofl:

1 Like

@Miguel_Galvez , We need to check whether this error-like display is just a visual issue or if the code is actually not being loaded properly. Based on your tests, whatā€™s the result? Does it still work despite the error-like display, or is the function completely broken? If itā€™s truly not working, it might be worth reporting this issue. :upside_down_face: Well, if such a catastrophic issue were really happening, I believe Wix would have already noticed and started addressing itā€¦

I checked and my code is not working.

Okā€¦

Honestly, I donā€™t have time to confirm it myself right now, but I will report it to the manager and Wix team @noahlovell @amandam for now.

1 Like

Hey! Taking a look :slight_smile: Will update when I have more info.

If you have any more info - e.g. the site it happens on/if this is a backend vs. page code file, that would be a huge help.

EDIT: made a quick test and can replicate, although the code is still running correctly. It seems visual, but happy to take with the team :raised_hands:

Iā€™m having this issue too. It started happening around 1am EST and I thought it was a fluke. ALL of my backend npmā€™s that Iā€™ve been using are saying the same as this sendgrid npm ā€œCannot find module ā€˜@sendgrid/mailā€™ or its corresponding type declarations.ā€

This isnā€™t just visual - its actually not pushing emails (that have previously been working) anymore.

Please help! =)

image

Definitely not visual, my @sendgrid/mail npm has been working up until around 1am EST. I thought it was a fluke and went to bed but none of my backend (.jsw and .js) npms are working including @google-cloud/storage, etc etc. I put a screenshot down below.

Any word back on the Wix team working on this?

I can also confirm that it is not just visual. Most of my code is broken, and I think it is due to the fact that none of my npm backend packages are working.

Its frustrating because Iā€™ve tried to contact customer care but the bot only allows me to open a trouble ticket and not chat with a rep. Its been 4+ hours since I opened trouble ticket and 3+ hours since it was brought to attention on here.
Clearly its not isolated and not being able to connect to npms cripples a site. =\

Same here. I opened a ticket 6 hours ago and I only got a generic customer support email requesting more specific information to try to replicate the problem. In the meantime my site remains broken.

I decided to build a work around using ā€œfetchā€ which is basically the same thing. Honestly, I didnā€™t really like having to depend on npms from the start for this very reason.

Unfortunately, thatā€™s not an option for me. I use some complex libraries that my code is dependent upon. I canā€™t believe that Wix has not acknowledge yet this problem.

Good morning! I checked again after waking up to see if the error was still occurring, and I found that the red wavy line was still appearing under the package name. So, I decided to run a quick experiment. I happened to come across a web.js file that contained a function using the CryptoJS package to hash text, so I tried using it in the frontend page code.

As a result, it seemed to work correctly without any errors. Based on my environment, my test results were the same as what noahlovell reported. However, this is just one test using a single package. The results might be different if multiple packages are used, if different types of packages are involved, or if the code is run in a .jsw or .js file instead of web.js.

Thatā€™s why I still trust the reports from Miguel and docmalc. I donā€™t think their skills are lacking, and if previously working code suddenly stops functioning for both of them at the same time, itā€™s natural to suspect that something has gone wrong. In fact, the appearance of the red wavy line seems to be a common issue for all of us.

I suggest that both of you try loading a different simple npm packageā€”just oneā€”and run it in web.js to see if it works. In situations like this, itā€™s important to fix the conditions and test with the simplest possible scenario.

By the way, are your files web.js, .jsw, or .js? :upside_down_face:

Thanks for your response.
Iā€™m not very familiar with web.js and donā€™t have the time to make sure Iā€™m writing it correctly with the function calls and so forth to troubleshoot this on my end.

However, I did try and test an email send via @sendgrid/mail npm via ā€œPreview modeā€ and although the red squiggly line ā€œCannot find moduleā€ error still shows, it did seem to still work and send the email.

Iā€™m still concerned because my clients were definitely having issues this morning and @sendgrid had no records of the emailSend calls. My test just now was done in Wix ā€œPreviewā€ environment and not on the live site. I didnā€™t build the ability to test sandbox data in a live environment so I canā€™t test on live site due any actions done will affect clientsā€™ clients and their data.

Iā€™d feel better if we could get some concrete answers from tech support at least acknowledging the issue and informing us of the reach the issue has.

I appreciate your help.

Thanks

Edit: all of my backend code is written in .jsw and .js files. The npm import error is showing on both the .jsw and .js files including @google-cloud/storage and all other npms.

I have a backend .jsw file that used the qrcode npm. I can see the npm is installed, but in Editor it shows a squiggly red line error (Cannot find module) on the line

import QRCode from 'qrcode';

However, when I tested the code in Preview mode it still worked.

In Preview mine worked but my concern is it working on a live site. Iā€™ve had issues in the past (unrelated) where it worked fine in Preview mode however on the live site it would not.