Bug 13349

Summary: npm install directory conflicts with node default
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Jean-Marie Lemetayer <jeanmarie.lemetayer>
Component: configurationAssignee: Jean-Marie Lemetayer <jeanmarie.lemetayer>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher
Version: 2.6.2   
Target Milestone: 0.0.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Jean-Marie Lemetayer 2019-05-14 09:21:48 UTC
Preconditions/Environment
-------------------------
Build environment with:
 - poky on the thud branch
 - meta-openembedded on the thud branch

Triggering Action/Cause
-----------------------
devtool add "npm://registry.npmjs.org;name=cute-files;version=1.0.2"

Expectation
-----------
A symlink file /usr/bin/cute-files is created and link to a valid file.

Actual Result
-------------
/usr/bin/cute-files links to ../lib/node_modules/.. and not to ../lib/node/..

Reproducibility
---------------
10/10
Comment 1 Richard Purdie 2019-05-16 14:48:38 UTC
Hi, Thanks for reporting this. Does the issue also reproduce against master?

Unfortunately we don't have an expert on the npm pieces right now, the people who worked on it have moved on to other things. Were you able to come up with a fix?

Cheers,

Richard
Comment 2 Jean-Marie Lemetayer 2019-05-17 14:08:24 UTC
Hi, yes I have a fix (and few others).

This touch the npm.bbclass file in meta/classes/npm.bbclass.

On which mailing list should I submit these ? bitbake-devel ? poky ?

Regards,
Jean-Marie
Comment 3 Jean-Marie Lemetayer 2019-05-17 14:11:14 UTC
Move to NEEDINFO
Comment 4 Richard Purdie 2019-05-21 21:59:07 UTC
Sorry, the npm.bbclass changes should go to the openembedded-core mailing list. I saw them on bitbake-devel and sorted them out regardless but if any future patches could go to there, that would be great!