npm link is a command on npm CLI which symlink's a package folder
Questions tagged [npm-link]
176 questions
3
votes
1 answer
Local repos as dependencies
I am developing in two repos, one a dependency of the other. I am on npm v5. I specify the dependency in package.json of main-repo as ../dependent-repo. When I do npm install, this creates a symlink for dependent-repo in main-repo/node_modules,…
user663031
3
votes
0 answers
webpack - hot reload on linked node_module change
In my local environment, I have my primary project (A) which links to another project/local library (B) via npm link.
When I make updates to Project B, I have to run a build and then re-assert the link. After this completes, I then have to…

Plummer
- 6,522
- 13
- 47
- 75
3
votes
1 answer
npm update unlinks linked packages
I have a project, which consists of one root node package containing subpackages linked together by npm link - these subpackages depend on each other (listed in package.json dependencies) and the structure basically looks like…

Dan Macak
- 16,109
- 3
- 26
- 43
2
votes
1 answer
Development of a custom module with TS in React App
I have 2 projects with common functionality.
I need to develop my own npm module that will use common code snippets for this.
I made a separate project that will contain this shared code (eg util).
At the moment I have done the following:
we have 3…

Dmitry Bauer
- 21
- 1
2
votes
1 answer
How can I use a local version of full calendar in my project?
I'm trying to see if I can contribute a fix to a couple of issues we've been having with full calendar.
I've cloned the full calendar repo using git clone --recursive git://github.com/fullcalendar/fullcalendar.git and run yarn install.
I've gone…

apbarratt
- 615
- 9
- 18
2
votes
0 answers
Npm link not linking because of vite
I'm trying to link two applications together. I have two projects. Both projects using Vue(2). One being the main project and the other a componet lib. I succesfully linked the two projects together with npm link. However my main project is giving…

ronoc4
- 625
- 2
- 6
- 21
2
votes
1 answer
Cannot import JSX/TSX component from another React app to my main React app
I have a fairly complex setup regarding two React apps.
Context:
I was tasked to create a design system using ReactJS to be later on used in their main app.
So i did made a design system in 1 week (w/ small knowledge in ReactJS; mainly a Vue dev)…

Keanu Kent Gargar
- 31
- 5
2
votes
0 answers
How to configure typescript in a project with linked local package
I am working on a project that is linked to some other local project like this:
{
"name": "lib-a",
dependencies: {
"lib-b": "file:../../lib-b"
}
}
The issue is that lib-b has some uncompiled module in its node_modules, and when I run tsc…

niryo
- 1,275
- 4
- 15
- 26
2
votes
0 answers
Exporting types and enums fails when using yarn/npm link
I'm trying to link a library between two projects to help with development workflow.
Sharing some code and types between my TypeScript backend and frontend.
It seemed to work with const functions, but when I add some enums and types I get this…

somerandomusername
- 1,993
- 4
- 23
- 55
2
votes
0 answers
How can I npm link the module in React project?
I working on a React project and I want to modify one of the module. Below is my step.
File tree:
/project
package.json
/project_need_module (the sub module)
1. cd /project/project_need_module
2. npm link
3. cd /project
4. npm link…

WILLIAM
- 457
- 5
- 28
2
votes
1 answer
Can't npm link local dependency
I'm trying to link local project testabc123 to myproject using the usual approach:
cd testabc123
npm link
cd ../myproject
npm link testabc123
However I'm getting the error message:
npm ERR! code E404
npm ERR! 404 Not Found - GET…

ABC
- 693
- 1
- 10
- 22
2
votes
1 answer
Why are unmet peer dependencies not resolved when using yarn link?
I have 2 node packages : foo-service and foo-commons.
foo-commons is a dependency of foo-service.
While development,every time there is a change in foo-commons, to use them in foo-service I copy the compiled source from foo-commons to …

97amarnathk
- 957
- 2
- 11
- 30
2
votes
3 answers
Angular 9 application build fails when working with linked libraries
I am developing an application and a bunch of libraries to be used in the application. All are recently upgraded to Angular 9. The libraries are configured to build without ivy and the application is configured to build with ivy, which is as per the…

Tanmay Ray
- 63
- 5
2
votes
1 answer
Can't find component templateUrl & stylesUrl in Storybook with a custom Angular Library and NPM Link
I'm trying to create a new Angular 10 library and a separate Storybook as it's documentation and development view. Everything works as expected when the html and styles are inline in the *.component.ts file. But whenever I try to create a new…

elDrimm
- 106
- 1
- 9
2
votes
1 answer
Shared library from Create React App projects giving (jsx isn't currently enabled error)
I'm attempting to use a shared library for reusable components and using just 2 out of the box Create react apps. One is called 'shared-lib' the other 'project-example'. I made a super simple component in shared-lib, exported (working when I…

benishky
- 901
- 1
- 11
- 23