I'm running into some difficulty building Node-RED 0.10.10 for an ARM
architecture project. I am trying to build using the Openembedded Yocto core
to cross-compile the firmware for the project I am working on. There are some
custom modifications that we have made to Node-RED, primarily adding our own
nodes integrated for our hardware. These changes have been integrated using
diffs applied to the code from GitHub. Due to these changes, I need to follow
the development procedure:
# cd node-red
# npm install
# sudo npm install -g grunt-cli
# grunt build
# node red
Previously the build was using "npm install --production" and built
successfully, and Node-RED would run just fine on our ARM based product. This
is no longer sufficient for building and running Node-RED 0.10.10 in the manner
we wish to build and install it because it appears that the build is now
generating files taht don't get created with "npm install --production". I am
presuming that Node-RED 0.11.1 will have the same requirement(s). Is this
correct?
There is a command in the Yocto project bitbake recipes called oe_runnpm that
allows the running of npm commands in the build with the appropriate
environment all set up. This is not working with the "grunt build". Whether
grunt is installed locally or globally the following error indicating that,
from what I can tell, grunt is using the build server architecture instead of
the cross-compile ARM architecture occurs:
ERROR: QA Issue: Architecture did not match (40 to 62) on /work/arm926ejste-mlinux-linux-gnueabi/node-red/0.10.4-r47/packages-split/node-red/opt/node-red/node_modules/grunt-sass/node_modules/node-sass/vendor/linux-x64-11/binding.node
I am not very familiar with this grunt utility. Is there any guidance or an
alternative that you could give me that might work to get this build to
succeed? This error is related to grunt-sass which requires node-sass, which
requires libsass. Is it possible that grunt-sass might not be necessary?
Thank You,
Jeff Hatch