Comments (15)
Thank you for reporting this issue.
I can not duplicate it in my setup, so could you please provide some log outputs?
To my knowledge npm should always prefer the current directory it is run from as a target for node_modules
(unless --global
parameters is used). The bitbake-npm expects this. If this is not the case I will look into options to forcing npm install path.
from bitbake-npm.
I removed some exports at the Running output. Basically export of ssh auth sock, proxies, home path and path variable.
log.do_fetch:
DEBUG: Executing python function do_fetch
DEBUG: Executing python function base_do_fetch
DEBUG: Trying PREMIRRORS
DEBUG: For url ['npm', '', 'bcryptjs', '', '', {'version': '2.1.0'}] comparing ['cvs', '.', '/.', '', '', {}] to ['http', 'sources.angstrom-distribution.org', '/v2013.06/', '', '', {}]
DEBUG: For url ['npm', '', 'bcryptjs', '', '', {'version': '2.1.0'}] comparing ['svn', '.', '/.', '', '', {}] to ['http', 'sources.angstrom-distribution.org', '/v2013.06/', '', '', {}]
DEBUG: For url ['npm', '', 'bcryptjs', '', '', {'version': '2.1.0'}] comparing ['git', '.', '/.', '', '', {}] to ['http', 'sources.angstrom-distribution.org', '/v2013.06/', '', '', {}]
DEBUG: For url ['npm', '', 'bcryptjs', '', '', {'version': '2.1.0'}] comparing ['hg', '.', '/.', '', '', {}] to ['http', 'sources.angstrom-distribution.org', '/v2013.06/', '', '', {}]
DEBUG: For url ['npm', '', 'bcryptjs', '', '', {'version': '2.1.0'}] comparing ['bzr', '.', '/.', '', '', {}] to ['http', 'sources.angstrom-distribution.org', '/v2013.06/', '', '', {}]
DEBUG: For url ['npm', '', 'bcryptjs', '', '', {'version': '2.1.0'}] comparing ['osc', '.', '/.', '', '', {}] to ['http', 'sources.angstrom-distribution.org', '/v2013.06/', '', '', {}]
DEBUG: For url ['npm', '', 'bcryptjs', '', '', {'version': '2.1.0'}] comparing ['p4', '.', '/.', '', '', {}] to ['http', 'sources.angstrom-distribution.org', '/v2013.06/', '', '', {}]
DEBUG: For url ['npm', '', 'bcryptjs', '', '', {'version': '2.1.0'}] comparing ['svk', '.', '/.', '', '', {}] to ['http', 'sources.angstrom-distribution.org', '/v2013.06/', '', '', {}]
DEBUG: Trying Upstream
NOTE: npm install npm://bcryptjs;version=2.1.0
DEBUG: executing npm --arch=arm --target_arch=arm install [email protected] --force
DEBUG: Fetcher accessed the network with the command npm --arch=arm --target_arch=arm install [email protected] --force
DEBUG: Running REMOVEDEXPORTS; npm --arch=arm --target_arch=arm install [email protected] --force
DEBUG: Python function base_do_fetch finished
DEBUG: Python function do_fetch finished
log.do_unpack:
DEBUG: Executing python function do_unpack
DEBUG: Executing python function base_do_unpack
DEBUG: Running REMOVEDEXPORTS; cp -r /home/cestonarot/Projects/magna/setup-scripts/sources/downloads/npm/bcryptjs_2.1.0/node_modules/bcryptjs /home/cestonarot/Projects/magna/setup-scripts/build/tmp-magna_2013_x-eglibc/work/armv7a-magna-linux-gnueabi/bcryptjs/2.1.0-r0/npm//
DEBUG: Python function base_do_unpack finished
DEBUG: Python function do_unpack finished
ERROR: Function failed: Fetcher failure: Fetch command failed with exit code 1, output:
cp: cannot stat '/home/cestonarot/Projects/magna/setup-scripts/sources/downloads/npm/bcryptjs_2.1.0/node_modules/bcryptjs': No such file or directory
from bitbake-npm.
I did no special settings or so. :(
for bcryptjs I used this recipe stuff:
bcryptjs_2.1.0.bb
SUMMARY = "Optimized bcrypt in plain JavaScript with zero dependencies. Compatible to 'bcrypt'."
SECTION = "nodejs/module"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d99a4f4253fea793a1256aef626aa6e5"
PR = "r0"
require node.inc
node.inc
NODEVERSION ?= "${PV}"
NODENAME ?= "${PN}"
SRC_URI = "npm://${NODENAME};version=${NODEVERSION}"
S = "${WORKDIR}/npm"
inherit npm-install npm-fetch
do_install() {
install -d ${D}${libdir}/node_modules/${NODENAME}
for i in
rel=$(echo "$i" | sed "s#${S}/##")
if [ ! -d ${D}${libdir}/node_modules/${NODENAME}/$(dirname $rel) ] ; then
mkdir -p ${D}${libdir}/node_modules/${NODENAME}/$(dirname $rel)
fi
cp ${S}/$rel ${D}${libdir}/node_modules/${NODENAME}/$(dirname $rel)
done
}
FILES_${PN} += "${libdir}/node_modules"
from bitbake-npm.
Thanks for the details. Looks like unpack
works as expected, but somehow npm
does not install to the current ./node_modules
after changing the directory to /downloads/npm/...
.
Other explanation is that fetch
somehow does not actually change to the correct directory under sources/downloads
. I think I'll have to add some debug logging to display the current path before running npm install
.
from bitbake-npm.
when I create an empty node_modules folder in my home before running bitbake, the bcryptjs stuff goes into this folder when running bitbake bcryptjs -c fetch .... so I guess npm is not correct.
from bitbake-npm.
Just checked npm folder docs at https://docs.npmjs.com/files/folders
It says that all local install should go to ./node_modules
no matter what. Obviously this is not the case here.
Have to look at the npm
source to see if there is some special handling for node_modules
at the homedir.
from bitbake-npm.
What is the npm version you are using npm -v
.. or are you running with bitbake compiled nodejs-native
or iojs-native
in native tools rootfs. If not it falls back to your local npm
installation.
from bitbake-npm.
nodejs-native was built, so I guess the bitbake's npm is used which has the version 1.4.28.
Can I somehow figure out which npm bitbake-npm is using?
from bitbake-npm.
I'll have to add some debug logging for npm install phase. Just testing various configurations myself.
Any reason why you are not running more recent node/npm? See https://github.com/imyller/meta-nodejs for recipe layer with latest node.js releases or https://github.com/imyller/meta-iojs for io.js.
from bitbake-npm.
yeah ... v8 c++ gets much more complex then :)
from bitbake-npm.
Use nan
to standardize with C++ ABI :)
from bitbake-npm.
thanks for the hint .... will have a look :)
from bitbake-npm.
Can you please test with changes made in master
or 1.26
branches.
from bitbake-npm.
Sorry for the delay! Fetch is working now. Thanks for fixing it!
from bitbake-npm.
Good to hear. Thank you for reporting and testing. I'm closing this issue as resolved.
from bitbake-npm.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitbake-npm.