rstacruz/webpack-tricks

npm link issues?

jrm2k6 opened this issue · 5 comments

I am still struggling with some npm link issues when trying to test a package locally, in an example app using webpack. Do you have any advice? I tried many things unsucessfully.

I'm not the best Webpack expert, but I assume you only need to do:

$ cd ~/sub_project
$ npm link  # makes sub_project available later
$ cd ~/super_project
$ # add `sub_project` to your package.json dependencies
$ npm link sub_project  # makes a link to ~/sub_project

...and continue using sub_project as needed.

try with

//up in the requires const path = require('path');
resolve: { fallback: path.join(__dirname, "node_modules") },
resolveLoader: { fallback: path.join(__dirname, "node_modules") },

in your config object.

cf: https://webpack.github.io/docs/troubleshooting.html

Wish I can help, but this issue's beyond my webpack experience level.

If the solutions me and @xavhan suggested didn't work for you, it might be a Webpack bug or a fault in your config/setup. I suggest trying to set up an isolated case and reporting your findings to the Webpack maintainers. Good luck!