When I use a linked package, and I run vsce package it fails with
Error: Command failed: npm list --production --parseable --depth=99999
npm ERR! invalid: <my_linked_package>
steps to reproduce in PowerShell:
git clone https://github.com/chriscamicas/vscode-abl.git
git clone https://github.com/chriscamicas/abl-tmlanguage.git
cd abl-tmlanguage
npm link
cd ..
cd vscode-abl
npm install
npm link abl-tmlanguage
npm run build
I'm running Windows 10 x64
There is currently no support for linked packages.
Not work with Lerna linked packages
Error: Command failed: npm list --production --parseable --depth=99999
I am running into same issue with a npm linked module. Did anyone find an alternative?
No solution so far, I have to link for development and unlink for the packaging to work
@chriscamicas can you please explain a little in depth? Once you unlink, it is not getting inside the vsix or does it?
using my previous example, my workflow is:
git clone https://github.com/chriscamicas/vscode-abl.git
git clone https://github.com/chriscamicas/abl-tmlanguage.git
cd abl-tmlanguage
npm link
cd ..
cd vscode-abl
npm install
npm link abl-tmlanguage
develop in both project
when dev is done I have to commit/push and publish to npm the second project abl-tmlanguage
Then I have to install this dependency like any other one in the main project, after removing the link
npm unlink abl-tmlanguage
npm install abl-tmlanguage
npm run build
@chriscamicas thanks a lot for the explanation. In my case, we haven't published the module yet to npm :(.
A better tutorial explaining how to use npm link
https://medium.com/dailyjs/how-to-use-npm-link-7375b6219557
Any progress on this? I develop a vscode extension that depends on a package I develop. Right now I have to push to npm in order to build a local .vsix file. Is there any solution to this? Is there a reason not to use
npm list --production --parseable --depth=99999 --link=true
with the link=true parameter?
What difference does it make to vsce where the node module comes from when packaging as long as it is in the node_modules folder?
Same issue here...
Why is the --link=true not included per default? Solved the issue
@joaomoreno Looks like the fix for this was reverted, I can still repro the problem when running out of sources
:man_facepalming: Completely forgot that it was. Thanks for reopening.
any updates on this? i'm running into this issue as well when packaging my extension locally
According to the doc, --link=true makes it _only_ list linked dependencies, I guess that's the reason why the test failed.
No idea on how to do it the right way.
Most helpful comment
Not work with Lerna linked packages
Error: Command failed: npm list --production --parseable --depth=99999