Questions tagged [npm-link]

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

Reference:

176 questions
7
votes
1 answer

How to unlink the local package? Where npm stores links in windows env?

I linked a locally developed package using npm link command. Since then I am not able to unlink it back. I am on windows 10. I have tried: npm unlink npm remove npm uninstall Completely wipe out npm caches and global repo. I would expect the…
Fis
  • 787
  • 2
  • 10
  • 24
7
votes
0 answers

How to config eslint-loader to lint NPM linked modules?

I am working on a large JavaScript project that's broken down into a few sub modules, each sub modules have their own git repository and Node dependencies. And we also have an entry point module, App, which has Webpack and ESLint…
Tianzhen Lin
  • 2,404
  • 1
  • 19
  • 19
6
votes
1 answer

ReactJS: Importing symlinked components error: Module parse failed: Unexpected token: You may need an appropriate loader to handle this file type

I'm writing a React component library which I want to use in other projects without much overhead ( bit, create-react-library, generact, etc. ) and without publishing. I want to use npm install ../shared_lib to add it to my project as a symlink in…
user3006493
6
votes
2 answers

How can I locally develop Angular 7 libraries that depend on each other? (npm link issues)

I have two angular library NPM packages: A has basic components A-BC has components that build upon the components in A, with added features to integrate with BC library Some components in A-BC import from A like import { MyThing } from…
Paul
  • 817
  • 1
  • 10
  • 25
6
votes
1 answer

Cannot use Vue component library with npm link

I am building a Vue application and a Vue component library at the same time. So, I would like to setup the library with npm link so I don't have to keep publishing my library package and re-install it in my main application. My package will be…
Troncoso
  • 2,343
  • 3
  • 33
  • 52
6
votes
1 answer

Styled-components with npm link results in the error: "Trying to insert a new style tag, but the given Node is unmounted"

I have created my own npm package (created with nwb) where I use styled-components. In my consuming app, I'm also using styled-components. The problem is. Everything works fine when installing my npm package via npm install. However, when using npm…
anmatika
  • 1,581
  • 3
  • 21
  • 29
6
votes
2 answers

PHP Is there an equivalent to npm link for composer?

When I am developing a JavaScript module, I can use npm link to install my local development version in local projects that use the module as a dependency. This is a great workflow. It's not developing in place, which I think is a less good than…
JPollock
  • 3,218
  • 4
  • 26
  • 36
5
votes
0 answers

Using npm link with a module utilizing Nuxt3 ends in error

I want to create an npm module with Nuxt 3 components. For that I defined the "nuxt.js" file the following way. import { join } from 'path' import { defineNuxtModule} from '@nuxt/kit' export default defineNuxtModule({ hooks: { …
rajohs
  • 237
  • 1
  • 6
5
votes
1 answer

How to develop two angular modules locally where module A imports module B

When developing two local projects in angularjs(where one imports the other) I would simply run "npm link" in module B's folder and then run "npm link module-B" in my main module's folder and whenever I changed a file in module B I would see it…
Viktor Eriksson
  • 5,677
  • 3
  • 20
  • 24
4
votes
1 answer

Using npm link returns error "Not Found - GET https://registry.npmjs.org/"

I am trying to link a local dependency of scss styles to a project using npm link. Following the docs I run npm link in the dependencies directory, which tells me: /usr/local/lib/node_modules/xxx/xyz -> /xxx/xxx/xxx/xxx/xxx/xyz The I got to my…
Mr. Robot
  • 1,334
  • 6
  • 27
  • 79
4
votes
1 answer

Cannot use GraphQLSchema "[object GraphQLSchema]" from another module or realm when using npm link

I'm using npm link to change my private package and see changes in action in another project. The problem is that both my projects use graphql as a dependency so I get an error Cannot use GraphQLSchema "[object GraphQLSchema]" I was trying to use…
Le garcon
  • 7,197
  • 9
  • 31
  • 46
4
votes
1 answer

Angular 6 Library - Difficulty symlinking into new project

I have an Angular 6 library that I am trying to export individual components from. Very much the same as Google Material Design. I followed this tutorial: https://blog.angularindepth.com/creating-a-library-in-angular-6-87799552e7e5 and followed…
codeNameLily
  • 321
  • 3
  • 14
4
votes
1 answer

Angular 5 - How to generate definition files

I have been trying several ways but I am not able to understand how to generate definition files for my project. I have two angular-cli generated applications A and B, I want A to consume B as a package (with npm link). As far as I understand I need…
Alejandro Morán
  • 669
  • 1
  • 13
  • 36
4
votes
1 answer

npm: missing transitive dependencies in node_modules

I have two local npm projects, A and B. Let's say A depends on react and has it listed as a dependency in the package.json file. I use npm link to make A available for B. B depends on A and react. I use npm link A to use the local version of A.…
Salim
  • 2,446
  • 1
  • 14
  • 12
4
votes
0 answers

Create an external module in Angular 4

I want create an external module and then import it into my project. I create a simple module ( widget.module.ts ) that have a component ( widget.component.ts ), so i generate a package.json file using npm npm init --scope=@mylibs # i give the name…
Vito Lipari
  • 795
  • 8
  • 35
1 2
3
11 12