hello,
ı have a node application. ı want to run this application on colibri imx6 computer on module.
operation system ınformation in here :
uname - a
Linux colibri-imx6 3.14.28-dirty #1 SMP Thu Feb 11 11:52:00 EET 2016 armv7l GNU/Linux
ı run this commands before installation;
opkg update
opkg install packagegroup-sdk-target
than install nodejs and and npm
opkg install nodejs nodejs-npm
than ı check phyton version gcc version node version npm version ;
python -V
Python 2.7.9
node -v
v0.12.2
npm -v
2.7.4
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/gcc/arm-angstrom-linux-gnueabi/4.9.3/lto-wrapper
Target: arm-angstrom-linux-gnueabi
Configured with: /build/jenkins/v2015.06/machine/beaglebone/build/tmp-angstrom_v2015_06-glibc/work-shared/gcc-linaro-4.9-r2015.03/gcc-linaro-4.9-2015.03/configure --build=x86_64-linux --host=arm-angstrom-linux-gnueabi --target=arm-angstrom-linux-gnueabi --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib/gcc --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/build/jenkins/v2015.06/machine/beaglebone/build/tmp-angstrom_v2015_06-glibc/sysroots/beaglebone --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-angstrom-linux-gnueabi- --without-local-prefix --enable-target-optspace --enable-lto --enable-libssp --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --with-float=hard --with-sysroot=/ --with-build-sysroot=/build/jenkins/v2015.06/machine/beaglebone/build/tmp-angstrom_v2015_06-glibc/sysroots/beaglebone --with-native-system-header-dir=/build/jenkins/v2015.06/machine/beaglebone/build/tmp-angstrom_v2015_06-glibc/sysroots/beaglebone/usr/include --with-gxx-include-dir=/usr/include/c++/4.9.3 --enable-nls --with-arch=armv7-a
Thread model: posix
gcc version 4.9.3 20150311 (prerelease) (Linaro GCC 4.9-2015.03)
now ı create a directory name of nodeapp than create project
mkdir nodeapp
cd nodeapp
touch app.js
npm init --yes
npm install serialport --save
but ı take an error :
root@colibri-imx6:~/nodeapp# npm install serialport --save
npm WARN package.json nodeapp@1.0.0 No description
npm WARN package.json nodeapp@1.0.0 No repository field.
npm WARN package.json nodeapp@1.0.0 No README data
\
> serialport@2.0.6 install /home/root/nodeapp/node_modules/serialport
> node-pre-gyp install --fallback-to-build
Traceback (most recent call last):
File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py",
line 15, in <module>
import gyp
File "/usr/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/__init__.py", line 8, in <module>
import gyp.input
File "/usr/lib/node_modules/npm/node_modules/node-
gyp/gyp/pylib/gyp/input.py", line 5, in <module>
from compiler.ast import Const
ImportError: No module named compiler.ast
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit
(/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(child_process.js:1074:12)
gyp ERR! System Linux 3.14.28-dirty
gyp ERR! command "/usr/bin/node"
"/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"configure" "--fallback-to-build" "--
module=/home/root/nodeapp/node_modules/serialport/build/Release/node-
v14-linux-arm/serialport.node" "--module_name=serialport" "--
module_path=/home/root/nodeapp/node_modules/serialport/build/Release/no
de-v14-linux-arm"
gyp ERR! cwd /home/root/nodeapp/node_modules/serialport
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node
/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure
--fallback-to-build --
module=/home/root/nodeapp/node_modules/serialport/build/Release/node-
v14-linux-arm/serialport.node --module_name=serialport --
module_path=/home/root/nodeapp/node_modules/serialport/build/Release/no
de-v14-linux-arm' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous>
(/home/root/nodeapp/node_modules/serialport/node_modules/node-pre-
gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:1015:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit
(child_process.js:1087:5)
node-pre-gyp ERR! System Linux 3.14.28-dirty
node-pre-gyp ERR! command "node"
"/home/root/nodeapp/node_modules/serialport/node_modules/.bin/node-pre-
gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/root/nodeapp/node_modules/serialport
node-pre-gyp ERR! node -v v0.12.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.18
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node
/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure
--fallback-to-build --
module=/home/root/nodeapp/node_modules/serialport/build/Release/node-
v14-linux-arm/serialport.node --module_name=serialport --
module_path=/home/root/nodeapp/node_modules/serialport/build/Release/no
de-v14-linux-arm' (1)
npm ERR! Linux 3.14.28-dirty
npm ERR! argv "node" "/usr/bin/npm" "install" "serialport" "--save"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! serialport@2.0.6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@2.0.6 install script 'node-pre-gyp install --
fallback-to-build'.
npm ERR! This is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls serialport
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/root/nodeapp/npm-debug.log
root@colibri-imx6:~/nodeapp#
please help me about this problem so important for us.
thank you so much …