Answer the question
In order to leave comments, you need to log in
How to use npm link?
Hello, in order to develop and use the webpack loader, I need the local repository to be one of the node-modules
I did
on the way
myProotProject/resources/loaders/first-loader> npm link
up to date, audited 3 packages in 5s
found 0 vulnerabilities
myProotProject> npm link first-loader
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/first-loader - Not found
npm ERR! 404
npm ERR! 404 '[email protected]*' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
Answer the question
In order to leave comments, you need to log in
https://docs.npmjs.com/cli/v7/commands/npm-link#sy...
Example at the very beginning.
The bottom line is that npm link needs to be used 2 times, first in the folder of the linked package without parameters, then in the folder where we link with the name of the linked package from its package.json
But in general this is a debugging tool, and for your purposes it is better to just give webpack absolute the path to the file with the loader, which is easiest to get through require.resolve
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question