My environment:
~/pega-usuarios
~/pega-usuarios/index.js #retorna um array de usuarios
~/pega-usuarios/package.json #"name":"pega" #pega será usado para npm link pega.
if I give a npm link
within this folder, a global symbology link will be created in {prefix}/lib/node_modules/<package>
Now I’m on my website and I want to get this list of users
~/usuarios
~/usuarios/index.js
~/usuarios/package.json #
giving a npm link pega
, now I have the package pega
that’s in the folder ~/pega-usuarios/
Reason why, when you make a change to ~/pega-usuarios
will also be done in ~/usuarios/node_modules/pega
Remarks
-When Voce requires a globally linked package, such as the case of pega
, It does not go to dependencies in package.json
he’s just going to node_modules/
Source
https://docs.npmjs.com/cli/link
in case, just I type
react-native link pacote
to make everything okay?– Italo Rodrigo
and if I use the above command, I no longer need to manually type in the android files?
– Italo Rodrigo
if you just give
react-native link
and will search all dependencies– Mateus
but can give
react-native link <nomedopacote>
and "link" just this– Mateus
@Italorodrigo if everything goes right you won’t need to type manually, but sometimes you’ll have to fix some things
– Mateus
@Matthew, I’m not in React Active or mobile development, but my answer applies to this case ?
– Alex
@Marcelorafael look at the truth I don’t even know what happens giving today the
npm link
on a project– Mateus