Use npm pack
+npm install
(as suggested by install-local package)
npm pack <path-to-local-package>npm install <package-version.tgz>
This will effectively copy your local package to node_modules.Note that this will package only production relevant files (those listed in the files section of your package.json). So, you can install it in a test app under the package own directory. Something like this:
my-package package.json test test-app package.json node_modules my-package
Assuming that test
dir is not included in the files
in my-package/package.json.
This works the same way with npm 5 and older versions.