npm link is a command on npm CLI which symlink's a package folder
Questions tagged [npm-link]
176 questions
0
votes
1 answer
How to import local copy of library in app built with create-react-app
I have a library I am writing. My library is build using rollup.
I want to include it in my main application. The app is built using create-react-app.
I would like to use the dev version of the library in the app without publishing it to the npm…

user1676688
- 414
- 4
- 15
0
votes
1 answer
dontenv (npm module) does not load correct .env file when executing node cli app from different folder
I'm building a node CLI App that it's using dontenv to load some environment variables to connect to a mysql db.
I used
npm link
command to link to global and run the CLI app from anywhere.
The problem I'm facing is that .env file it's only loading…

chamix
- 133
- 1
- 7
0
votes
1 answer
Install package from npm after linking to another local package with updated version
I'm sure others have this workflow, so I must be missing something here.
How does one go about developing a new version of a package, linking it to test in another app, and then installing another (unrelated) package?
What I've done:
Run git clone…

Californian
- 808
- 1
- 8
- 15
0
votes
1 answer
NPM Link multiple Functions / Modules in same Project?
I have a few helper functions I'd like to have available globally in the command line. I have been able to achieve this with npm link, following this tutorial:
{
"name": "tool1",
...
"bin": "./standalone-functions/tool1.js",
...
}
However,…

userjmillohara
- 457
- 5
- 25
0
votes
1 answer
What is the simplest way to share one of my libraries among my React Typescript projects?
Suppose I want to share some common data object or utility classes among my React projects (locally only). For example, a utility class that performs complex string or data structures manipulation.
Which would be the best way of doing it? Should I…

corsair
- 347
- 3
- 13
0
votes
1 answer
Cannot access Vue directive with npm link
I forked an npm module and would like to make some changes, test them locally and then open a pr.
I have two folders:
~/projects/some_module-test where I would like to run a Vue app to test my changes.
~/projects/some_module is the forked repo of…

suuuriam
- 687
- 12
- 24
0
votes
1 answer
Running "npm link" broke yarn and npm?
I ran npm link in a project. I got some error message and ran npm unlink to get back to where I were.
Now many essential npm and yarn commands have stopped working.
For example:
PS C:\Users\SESA572442\Dev\graphics\tgml> yarn build
yarn run v1.22.0
$…

user1283776
- 19,640
- 49
- 136
- 276
0
votes
1 answer
Node Module path to relative files
So I have written a short node module (module1) as a wrapper for a binary (.exe) that can be called via command line.
This is how I get the path to the binary to execute the .exe with execFilePromised.
It works in my module1.
const __dirname =…

rufreakde
- 542
- 4
- 17
0
votes
1 answer
How do I configure my angular library to use the correct install of RxJS llinking it for local testing?
I have been able to build, link and import my library into my main application, however my library provides a service that returns RxJs Observables and I am having an issue where the return type is of the RxJs observable found in the library…

Craig
- 1,648
- 1
- 20
- 45
0
votes
1 answer
How I unlink deleted global package?
I had linked one package with the command npm link inside the package folder and then I delete it and I can't unlink the package from npm global list.

xargr
- 2,788
- 1
- 19
- 28
0
votes
1 answer
How to share data between multiple react applications?
I am following micro service architecture for develop react application.
There are multiple projects of react and link in one main react application using npm link. which works successfully.
Web api is developed in Asp.net core.
The concept is…

Kiya
- 168
- 1
- 17
0
votes
1 answer
Babel cannot parse files using Flow from a local custom module. Fails with the following error: `Module build failed...SyntaxError: Unexpected Token`
So I'm creating a web app, we'll call WebApp, which is a React module that uses components from a custom React module, we'll call CustomModule, that is also located on my local machine. I've been trying to import certain components from CustomModule…

Daniel Wiseman
- 31
- 3
0
votes
2 answers
Node-Red custom node_modules location
I'm using node-red as embedded in my Express.js application like this
https://nodered.org/docs/embedding. When embedded like this node-red cant load new nodes from npm.
Issue is that when defining custom user dir in settings.js, for example userDir:…

user257980
- 1,059
- 2
- 15
- 31
0
votes
1 answer
WARN tar EISDIR: illegal operation on a directory
I am trying to publish a module to npm registry. Before publishing I tried npm link command to install it as a local dependency.
Running the command started throwing errors similar to following.
WARN tar EISDIR: illegal operation on a directory,…

It worked yesterday.
- 4,507
- 11
- 46
- 81
0
votes
1 answer
How to monitor link'd modules with budo dev server?
my current front-end dev setup is below:
browserify as build tool
budo as a development server
I have a couple of shared modules packaged up and published on npm for use as a dependency among many projects.
However the development feedback cycle…

fatg
- 519
- 7
- 23