Giter Club home page Giter Club logo

Comments (6)

IsraelOrtuno avatar IsraelOrtuno commented on August 15, 2024 2

Same here, I can't use in a simple Vue app

Cannot find module './build/Release/re2' from 're2.js'

from url-regex-safe.

niftylettuce avatar niftylettuce commented on August 15, 2024

This does work in the browser. I made it so it doesn't require re2 in the browser, see package.json and the code.

from url-regex-safe.

Kikobeats avatar Kikobeats commented on August 15, 2024

Hum I think you're right and actually, the error I'm experimenting with is the environment where the code is running can't compile re2 properly

at runkit.com

Screen Shot 2020-10-14 at 00 43 32

at vercel.com

Screen Shot 2020-10-14 at 00 42 55

which is also a pain, any idea what's happening?

from url-regex-safe.

niftylettuce avatar niftylettuce commented on August 15, 2024

If you can share a reproducible repo I could try to find time to look at this, guessing its a bundler issue or yarn/npm. What version of Node are you on?

from url-regex-safe.

Kikobeats avatar Kikobeats commented on August 15, 2024

reproducible example: https://runkit.com/kikobeats/5f85c1f39b9a71001a1025c7

from url-regex-safe.

phiberber avatar phiberber commented on August 15, 2024

Is it possible to be related with re2 install script not being called?

install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR || npm run rebuild.

Maybe url-regex-safe can't find the re2 module because the .node file wasn't installed yet.

const RE2 = require('./build/Release/re2');

The solution may be to use lazy import with re2 or url-regex-safe.

from url-regex-safe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.