Support Forums

Cannot find module 'scrape-it'

First of all. Im pretty new to functions. So there is anything i did completely wrong just tell me.

I got the function to work with “netlify dev” but as soon as i upload it the build fails and i get this error:

Plugin “@netlify/plugin-functions-core” internal error
Error: In file “/opt/build/repo/functions/lfr.js”: Cannot find module ‘scrape-it’ Require stack

Here is the link to the failed build:

The package-lock.json itself contains the package “scrape-it” so it can’t be this.

Im adding the function code below in case i made a mistake in there:

the data displayed on the website does also show the reponse and body even if data should only contain the fetched data from the website.

hi @Fabian9799, is the module included in the package.json file?

I only had a package-lock.json
i only had to do “npm init -y” and now it works.

Thanks for your help!

1 Like