"Require" not finding installed NPM package

I’ve installed the ‘fibery-unofficial' npm package into a website . The docs for the package say to call it as:

const Fibery = require('fibery-unofficial')

I’ve done so in a new back-end Javascript Web module file. Problem is that I’m getting the red squiggly line under the package name, indicating (I guess) that Wix can’t find it.

Any ideas why this is happening? I’m not a pro developer, so please don’t assume too much knowledge on my part. :slight_smile: I have built this same website before with Airtable; I’m trying to do the same now with Fibery.

Thank you!

image

1 Like

When you hover over the red line, you should get a little popup with a note that explains why it’s go this error. Can you share what the error says?

require is the CommonJS standard, I’m not sure if Wix works with it, but it might be worth to check with the ES Modules standard:

import Fiber from 'fibery-unofficial'

and as Noah requested, seeing the actual error would help identifying the cause

1 Like

Thank you both for the responses. Here is the original error:

And here is the error I get if I try the ES Module version:

And here’s showing that it should be installed:

I’m stumped!

Following up on this, I should have ignored the error and just tried some calls. :grinning_face: In fact, it’s working fine. No idea why the editor thinks it’s not installed; but it appears to be fine, even with the “require” format. Though the “import” option works, too. I still have the red squiggly line, but I’ll just ignore it.

Thank you for your help on this!

2 Likes

That is actually the reason I don’t use NPM/SDK packages in Wix, had too mny errors just instslling them :confused:

Glad it all worked out :slight_smile: