uhop / node-re2

node.js bindings for RE2: fast, safe alternative to backtracking regular expression engines.
Other
495 stars 53 forks source link

cannot find module /build/Release/re2 in Azure deploy #132

Closed katrina-jh closed 2 years ago

katrina-jh commented 2 years ago

My app runs fine locally, but when deployed in Azure, there is the below Application Error. The App was working fine until a few days ago. Do you know what the issue might be, do I have mismatched versions

cannot find module ‘./build/Release/re2’

node@ 14.15.1
re2@1.16.0
@metascraper/helpers@5.21.10

Screen Shot 2022-08-23 at 12 34 59 pm

uhop commented 2 years ago

./build/Release/re2 is being built or copied from the repository when being installed. The latter (copying) is used as an optional speed up. Make sure that your system has all necessary system packages installed as outlined in the node-gyp documentation: https://github.com/nodejs/node-gyp

It was reported that in some cases yarn or pnpm managers can skip the build step completely. In this case try npm to see if the problem persists.