cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Ginchereau <>
Subject RE: NPM v3 packaging issues
Date Tue, 31 May 2016 17:01:33 GMT
Could npm shrinkwrap be a solution? The cordova-coho docs mention shrinkwrap was avoided previously
because it was "not mature", but it has apparently improved a lot in v3. According to a comment
[1] in another related issue it has solved this problem in v3. I'm not totally familiar with
the platform versioning and packaging strategy though so I may be missing something.



-----Original Message-----
From: Vladimir Kotikov (Akvelon) [] 
Sent: Tuesday, May 31, 2016 12:11 AM
Subject: NPM v3 packaging issues

Hey, guys

We've just ran into issue, caused by NPM v3 flat directory structure. The issue is that NPM
does not pack sub-dependencies of bundled dependencies into resultant archive. This only affects
flatten dependency trees, but we already switched to that in platform repos.

As an example, we have 'elementtree' dependency in cordova-windows, which depends on 'sax'.
After running 'npm install' these dependencies installed as a siblings into 'node_modules',
but after running 'npm pack' (in particular - 'coho create-archive') the resultant .tgz contains
ONLY 'elementtree' but not 'sax'.

Related NPM issue is

AFAIK, the only solution for now is to revert 'node_modules' structure back to tree form.

Best regards, Vladimir

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message