Search code examples
node.jsnpmbabeljsnode-modulesrollup

npm link and rollupjs cannot find es6 module


I'm using rollupjs with babel, node-resolve and commonjs plugins. It works fine as I can import foo from "foo" to import foo from a npm-package called foo.

I now want to contribute to a dependency and test it using npm link. So I cloned the repository of the dependency, issued npm link inside it's directory and then issued npm link foo in my project's directory to use that local copy of foo. Now rollupjs throws an error when it comes to import foo from "foo" complaining that it cannot find the module foo.

Am I missing something or is rollup.js not yet ready for npm linked modules?


Solution

  • npm link creates symlinks and rollup doesn't support them yet.