GithubHelp home page GithubHelp logo

Support npm/yarn linking about metro HOT 7 OPEN

facebook avatar facebook commented on April 20, 2024 38
Support npm/yarn linking

from metro.

Comments (7)

iddan avatar iddan commented on April 20, 2024 23

This is a major issue for react native OSS package maintainers as it is very hard to test the code in example projects

from metro.

aleclarson avatar aleclarson commented on April 20, 2024 2

Symlink support is being tracked in #1. See this comment, specifically.

from metro.

pavlos256 avatar pavlos256 commented on April 20, 2024 1

I tried the rn-cli-config.js but it didn't work

For anyone else reading this, rn-cli-config.js has been renamed to metro.config.js and here's the relevant section.

Sample metro.config.js to look for mymodule in ./mymodule:

module.exports = {
    transformer: {
        getTransformOptions: async () => ({
            transform: {
                experimentalImportSupport: false,
                inlineRequires: true
            }
        })
    },
    resolver: {
        extraNodeModules: {
            "mymodule": "./"
        }
    }
};

from metro.

skovhus avatar skovhus commented on April 20, 2024

@iddan agree. But note that there is a workaround (see my rn-cli-config.js file).

from metro.

bugs181 avatar bugs181 commented on April 20, 2024

Just ran into this issue myself. Only my error was slightly different. Glad Google brought me here.

On iOS screen:

Metro Bundler has encountered an internal error, please check your terminal error output for more details

Terminal:

[20:58:54] undefined
[20:58:54] Failed building JavaScript bundle.

Setup:

"expo": "^29.0.0",
"react": "16.3.1",

However just prior to this I did npm link moduleName

from metro.

hosseinalipour avatar hosseinalipour commented on April 20, 2024

I tried the rn-cli-config.js but it didn't work

from metro.

Roopbasant007 avatar Roopbasant007 commented on April 20, 2024

I found a kind of bug while installing some packages related to yarn in our system if the user name is space separate string. for example, the user name is Roop Basant. It throws an error that the user is not found.

from metro.

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.