meta-nodejs icon indicating copy to clipboard operation
meta-nodejs copied to clipboard

Attempting to install custom node package, but files are not being copied into the build

Open RobGries opened this issue 8 years ago • 1 comments

Hello,

I'm attempting to use this meta-layer and it's class to install a custom nodejs package, but I cannot get my files to copy from my ${WORKDIR} to my build.

This is the bitbake recipe that I'm working with:

SUMMARY = "nodeJsServer"
SECTION = "meta-custom"
AUTHOR = "Company"

LICENSE = "CLOSED" 

SRC_URI = "<private_repo_URI>"
SRC_URI[md5sum] = "???"
SRC_URI[sha256sum] = "???"

S = "${WORKDIR}/git"

inherit npm-install-global

I browsed to my workdir and it appears that the sources are being populated into the git/ directory there but I'm not seeing them show up in the global package dir on my build (/usr/lib/node_modules/nodeJsServer). Instead I get a broken symlink to a non-existent directory called /git on the root of the image.

Am I missing a directive to copy the node files into my build root or something?

Thanks, Rob

RobGries avatar Dec 04 '17 23:12 RobGries

Ah, nevermind, I got it. I was able to populate the path using a do_install() directive like this:

do_install(){
   	install -d ${D}${libdir}/node_modules/nodeJsServer
	cp -r ${S}/* ${D}${libdir}/node_modules/nodeJsServer
}

It works great now, you can probably close this.

RobGries avatar Dec 05 '17 17:12 RobGries