npm link is a command on npm CLI which symlink's a package folder
Questions tagged [npm-link]
176 questions
0
votes
0 answers
Vite build issue when using npm link
Good day everyone!
I'm trying to develop an npm package that contains a web worker inside. If I import the scripts of my "../index.js" package, everything works. But if I import my package via npm link then an error appears in the console:
files in…

XaVi7777
- 13
- 3
0
votes
1 answer
"Error: inject() must be called from an injection context" with npm link, Angular and library with peerDependencies
I have an application MyApp and a library MyLib. MyApp consumes MyLib. We package and bundle MyLib on Azure Devops as an Artifact, that can be consumed both on Azure and locally. This all works fine.
However, I want to work on both MyApp and MyLib…

Century
- 283
- 1
- 4
- 22
0
votes
0 answers
Running NPM link inside a package that already use linked package
I have 2 NPM packages that I'm developing, one of them is for TypeScript interfaces and the other one is for Typed mongoose schemas.
In some cases I want to update the interfaces locally, then continue developing the schemas according to most…

Raz Levy
- 138
- 1
- 9
0
votes
0 answers
MUI v5 theme not working, except with link
I'm working on a library with MUI v5. The problem is I'm importing this library to a React project (React v17.0.1) which uses MUI v4.
The problem is that the MUI theme is not working on my components, except if I use my library doing npm link.
Any…

Alexandre Colon
- 11
- 2
0
votes
1 answer
npm link not work as I expect but can see node module updated
Hi I plan to test my node module from local;
I navigate to the folder I need to link and did
npm link
This created a symlink locally.
Then I navigate my project and did
npm link @account/api
Then I see the node module @accout/api under my project…

hounan
- 19
- 5
0
votes
0 answers
How do I resolve this dependency conflict from when doing npm link
When I do npm link like this in Window 10:
L:\git\notistack> npm link L:\react\Greta100Weeks\greta100weeks\node_modules\react
In my app when I do import { useSnackbar } from 'notistack'; then I can use the notistack ok, and it's the global…

Kid
- 1,869
- 3
- 19
- 48
0
votes
1 answer
How to get require(packagename) to work, Error: Can't resolve 'api/DefaultApi' in react
I have a new package to add to my build for a React SPA. I'm using package.json, webpack 3.x and npm. The instructions for the package are:
To use the library locally without publishing to a remote npm registry, first install the dependencies by…

smartblonde
- 138
- 1
- 11
0
votes
1 answer
I could link the package with my project using 'npm-link'. But, Some how in the browser, the changes are not reflecting properly
I have a component library [design-system]. I want to use that library in another project.
I did run npm-link in 'design-system' and npm link design-system in the project.
First, the link didn't work, after I deleted package-lock.json and did npm i.…

Danielprabhakaran N
- 530
- 1
- 7
- 16
0
votes
0 answers
tried to npm link and run the package after but throws an error "no such file"
i did an npm link to my node package for generating password. however, after npm link and it throws these error:
npm WARN saveError ENOENT: no such file or directory, open '/Users/valeryfun/package.json'
npm WARN enoent ENOENT: no such file or…

Valery Fun
- 194
- 10
0
votes
4 answers
Vue.js : $attrs is readonly, $listeners is readonly
I tried to build my own component library implementing Vuetify, by using vue-cli vue create d-components. My components are registered through an install function exported in my lib's main.ts file such as:
import Vue, { VueConstructor } from…

R.Duteil
- 1,205
- 1
- 13
- 26
0
votes
2 answers
The npm link shows errors when importing a component in typescript
I have a problem importing a component that is written in typescript. This component is in the Storybook, which is in a separate repository, i.e. it is a separate application. For my project which is written in real time, it imports the Storybook…

taaniel
- 53
- 5
0
votes
1 answer
NPM Link: get path where package is installed
I try to build my first npm package, but now I got stuck.
I want to load from my package a config file that is located in the root of my test-project
I used "npm link my-package" to install it locale for testing (if this important)
This is my folder…

Gregor Voinov
- 2,203
- 7
- 34
- 52
0
votes
1 answer
Where is `npm link` registring commands on Ubuntu?
Background
I have an NodeJS oclif CLI named "mydemo" and ran npm link to register and execute the program's commands globally. After I ran npm unlink mydemo to unregister the command, when I type the program's name, I get the error below.
$…

Eric Swanson
- 820
- 1
- 9
- 19
0
votes
1 answer
Undo npm link when syncing node_modules, react & react-dom
I found this fix to an issue that I was having trying to use hooks in a package I was developing and getting an error trying to use multiple instances of React. This worked for me, but I'm wondering how to "undo" all of this when I'm ready to test…

monkeymynd
- 69
- 1
- 1
- 5
0
votes
1 answer
using npm link with web3
I'm trying to patch one of the web3 packages and use the patched version in my node script. I'm confused about what to use in the npm link program: web3 or web3.js.
Here's what I did:
Cloned the web3 repo.
Executed npm bootstrap (which linked web3…

ulu
- 5,872
- 4
- 42
- 51