Questions tagged [npm-link]

npm link is a command on npm CLI which symlink's a package folder

Reference:

176 questions
2
votes
1 answer

Need to continually re-install node modules after every angular library build

I found it really hard to phrase this question. I hope it makes sense. I have searched here and more generally to try to find a reference to this behaviour but haven't found anything. I have an angular library project which has been working…
Chris Curnow
  • 643
  • 5
  • 15
2
votes
1 answer

Getting an error while using the npm link command

I am trying to use the npm link command on my windows computer but getting this error can someone help me in this regard I am stuck on it for a while now npm ERR! code EPERM npm ERR! syscall symlink npm ERR! path C:\projects\app npm ERR! dest…
waqas
  • 23
  • 3
2
votes
0 answers

Npm link : cannot find library's module

I work on a main app and an external library. I've used npm link to create a link in the main app to the library. In the main app, I've added some imports like : import { MyLibComponent} from '@scope/myLib'; Those imports used to work before I use…
Lempkin
  • 1,458
  • 2
  • 26
  • 49
2
votes
1 answer

how to manual link npm package 'react native reanimated'

Can anyone please tell me how to manual link react-native-reanimated because the automatic cli linking not working and crashing react native app
Savad
  • 1,240
  • 3
  • 21
  • 50
2
votes
2 answers

Using vuex store with npm-link in vue-cli 3 project loses $store

I think this is a config issue related to keeping store in an npm-linked folder. I made a vue-cli 3 project and got the “counter” example running (from https://github.com/vuejs/vuex/tree/dev/examples/counter) Works: When I move the store.js to an…
Nathaniel Rink
  • 475
  • 4
  • 19
2
votes
1 answer

How to handle `npm link` with babel? Getting unexpected token error

I am using npm link on a parent repo (A) to link a child repo (B). The npm link works like normal but Repo A is using babel to transpile code and seems to either ignore node_modules dependencies or symlinks. I have a spread operator in my Repo B and…
PGT
  • 1,468
  • 20
  • 34
2
votes
0 answers

npm install wipes out any linked modules

Say I npm link moduleA, and then in projectB I run npm link moduleA, then I wind up with a symlink to moduleA in projectB/node_modules/moduleA. However, if I run npm install in projectB, then moduleA is now missing from projectB/node_modules and I…
Alex Bollbach
  • 4,370
  • 9
  • 32
  • 80
1
vote
0 answers

Use "npm install -name-" removes "npm link" dirs from node_modules

I have my development package. I did "npm link" for it. Now I go to another project and set up it here "npm link my". Everything is good at this stage. npm install node-fetch But if I need to install something else, then after installation, my first…
mike-al
  • 31
  • 3
1
vote
0 answers

NPM LINK how my team get the code while the shared module not push to npm or even registered at the package json

So I just try to use npm link for my multi project, everything work just fine for now, but one thing that i dont understand is since the shared folder not registered in the package.json and the node_modules folder not pushed to the remote repo then…
rionalab
  • 42
  • 5
1
vote
1 answer

Npm link and scoped packages

When running npm link (as per the multiple vague blog posts on the subject) on a private scoped packed, I am getting an E404 error. This seems particularly odd considering the entire point of npm link is to sym-link local files. I do not understand…
myol
  • 8,857
  • 19
  • 82
  • 143
1
vote
2 answers

What is the purpose of npm link and how to use it in React JS Projects?

As I am new to React JS and Node JS, I am unable to understand the purpose of npm link and how to use it in React JS Projects even from the npm documentation. It is appreciable to explain the same with example.
1
vote
0 answers

npm link not working for one of four local packages

I have 4 packages in my package.json: "@CT/package-1": "*", "@CT/package-2": "*", "@CT/package-3": "*", "@CT/package-4": "*", All four packages are not on the NPM registry, but locally linked. In each package directory I did: sudo…
Martin Braun
  • 10,906
  • 9
  • 64
  • 105
1
vote
1 answer

Restarting tsserver when node_modules changes, ie; when using npm link

When working on an npm package it's convenient to use npm link for local development. Preamble For example, assuming the following folder structure: /lib /consumer An npm package "lib" would be in /lib, and npm link . makes it available for…
shuckster
  • 5,279
  • 2
  • 23
  • 22
1
vote
0 answers

React project does not recognize React local librery typings linked by npm link

I developed this React main project (foo-proj) and a React design library (foo-lib). In order to improve local development I used "npm link" to use foo-lib inside foo-proj. - foo-proj - ... (npm link foo-lib) - foo-lib - symlink - - foo-lib -…
PaulLeonH
  • 53
  • 1
  • 4
1
vote
1 answer

IntelliJ and WebStorm treating npm linked local module as an indirect dependency, and not using it in it's suggestions

I have a local node module I am trying to reuse in my other modules. I use npm link to add the module as a dependency to other modules. Everything works fine, however IntelliJ Treats this as an indirect dependency even if I add the dependency to the…
TeabagD
  • 569
  • 6
  • 17