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.

[1] https://github.com/npm/npm/issues/11287#issuecomment-175262681


Jason


-----Original Message-----
From: Vladimir Kotikov (Akvelon) [mailto:v-vlk...@microsoft.com] 
Sent: Tuesday, May 31, 2016 12:11 AM
To: dev@cordova.apache.org
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 https://github.com/npm/npm/issues/8474

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

-
Best regards, Vladimir

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to