npm link is a command on npm CLI which symlink's a package folder
Questions tagged [npm-link]
176 questions
4
votes
1 answer
Npm local module development with Hot Reloading
I'm building 2 npm packages that are dependent.
Module A (package.json)
"dependencies": {
"module-b":"~0.0.1"
}
We use npm link to connect these two apps locally. Currently we need to run npm run prepublish on module-b to visualise the changes on…

Prasanna
- 10,956
- 2
- 28
- 40
4
votes
1 answer
NPM Link to Src Dir Instead of Lib Dir
I'm working on several NPM modules at a time - there is one main module that imports three others. I have used npm link to link the others to the main module, however I am writing all the modules using Babel to transpile the source. When I build one…

Undistraction
- 42,754
- 56
- 195
- 331
3
votes
0 answers
npm link interdependent local packages (A->B->C) with common dependencies?
I have three packages I am developing locally:
@AcmeOrg/A (the host-app)
@AcmeOrg/B (the sub-app)
@AcmeOrg/C (a feature for the sub-app)
A depends on B, B depends on C
All 3 have a few common "peer" dependencies: i.e React and some other…

tdc
- 5,174
- 12
- 53
- 102
3
votes
1 answer
NestJS - Nest can't resolve dependencies - When using npm/yarn link
I've hit a dead end on trying to use multiple packages in my app with the npm link command.
I have a core project ( which produce an artifact published to npm ) and an app project which is using the core lib. Everything is fine when using the lib…

Eddie Firut
- 31
- 2
3
votes
0 answers
Module not found: Can't resolve "NPM LINKED MODULE" when using npm-link
I'm working on a TypeScript React application which heavily relies on a private NPM package. I can successfully link the NPM package, but after doing so I get the error
/src/components/xxxx/xxxx/xxxxx/xxxxHoc.tsx Module not found: Can't…

HP-Liam
- 31
- 3
3
votes
0 answers
Should you use `npm-link` in production
So let's say I've created a package with certain modules (or React components) and I have multiple projects that could use the same modules. I use npm link to do this and it works fine in development. But is it advisable to do the same in…

Zephyr
- 1,612
- 2
- 13
- 37
3
votes
0 answers
Completely remove npm link
On my Mac, I accidentally use npm link in a project root directly. Now every time I install packages it's getting from our proxy service. I want to remove that link. How can I do that? I removed node, npm, and nvm also. Thank you.

Dananjaya Ariyasena
- 606
- 3
- 15
3
votes
1 answer
npm link dev packages when using docker dev containers
Use npm link for authoring multiple packages simultaneously in docker dev containers
PkgA is a dependency of PkgB, I'm making changes to both. Goal is to be able to link PkgA in PkgB without publishing each small update and re-installing. npm|yarn…

Schalton
- 2,867
- 2
- 32
- 44
3
votes
1 answer
Way to Hot Reload a local Vue Plugin within a local Vue Application?
Is there a way for Hot Reloading to occur on a local npm dependency of a local Vuetify application using yarn serve (which is probably using webpack / vuetify-loader)?
BUSINESS CASE
We have some common Vuetify components that I'd like to expose with…

Garrett
- 211
- 2
- 5
3
votes
1 answer
How to fix 'Cannot find module' in a vuejs module with npm link
I've created a vuejs library with some components that could be used in many project.
In that library, I've got a component which can load svg files to be used inline in html (svg-icon).
It work great.
But in this same library, I've got another…

Aurélien Lemaitre
- 121
- 1
- 1
- 7
3
votes
0 answers
Receiving 'Error: Can't resolve ' when attempting to use a custom built module locally
I am attempting to import a module that I have created locally and linked / installed to another module which is built and run via webpack.
I have used a variety of methods to integrate the custom module into the other module:
npm link the custom…

Daniel Wiseman
- 31
- 3
3
votes
4 answers
Problem using yarn link to consume local npm package that has peerDependencies
I am running into the following problem when trying to develop a React component library using styled-components.
For the purpose of this example, let's assume we have two repos, app and core and that core will be consumed by app.
Currently, core…

pengurino
- 41
- 1
- 3
3
votes
1 answer
Cannot read property '@global' of undefined - NPM link MUI components
I have created a number of React components which wrap Material-UI components and are packaged as an NPM module.
The module works fine when installed via the remote package: npm install *name-of-package*, or via local install: npm install…

Ryan Achten
- 495
- 4
- 21
3
votes
1 answer
Skipping npm install when running npm link
I already have node_modules installed, and I want to run npm link, is there a way to skil npm install phase when running npm link, something like:
npm link --skip-install
or
npm link --install=false
here at the npm link docs:…

Alexander Mills
- 90,741
- 139
- 482
- 817
3
votes
0 answers
npm link error code: 128
I am developing a piece of software and realised that a part of it should be a separate package. Before splitting the code, I decided to try the npm link command. I followed the npm documentation to create a dummy package (exactly what the…

Lisa
- 31
- 1