Open eflister opened 7 years ago
also, although
node
is on myPATH
and normally runs fine, for some reason your scripts required it to be available from/usr/bin/
This sounds like your PATH
variable isn't export
ed; try adding export PATH
to your .bashrc
(or similar).
is there any way to use something like
test/local.js
to serve the handler in a standalone local mode
It should still be working IIRC; you might need to manually run these steps before trying to use the script though.
export
doesn't help:
erik@erik-VirtualBox:~/lambda-compile$ cat ~/.profile
...
export PATH="$HOME/nodejs/node-v7.9.0-linux-x64/bin:$HOME/bin:$HOME/.local/bin:$PATH"
erik@erik-VirtualBox:~/lambda-compile$ source ~/.profile
erik@erik-VirtualBox:~/lambda-compile$ sudo deploy/create.sh stable
>>> Bunzipping
>>> tar -xjf lilypond-2.18.2-1.linux-64.tar.bz2 -C ly
>>> Patching Ghostscript
>>> Copying fonts
>>> Version 2.18.* needs font.scm patch
>>> Building JavaScript with Babel
>>> npm run build
> lilybin-lambda-function@1.0.0 build /home/erik/lambda-compile
> echo $PATH && rm -rf lib && babel -d lib src
/usr/share/npm/bin/node-gyp-bin:/home/erik/lambda-compile/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
/usr/bin/env: ‘node’: No such file or directory
npm ERR! Linux 4.8.0-36-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! lilybin-lambda-function@1.0.0 build: `echo $PATH && rm -rf lib && babel -d lib src`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the lilybin-lambda-function@1.0.0 build script 'echo $PATH && rm -rf lib && babel -d lib src'.
but putting that slink back makes it work. is it to do with using sh
instead of bash
cuz of the #!/bin/sh
?
regarding local.js
, i have it working fine, i just mean all it does is one precanned example -- it would be cool if it was a server that responded to POSTs, simulating an aws lambda instance locally.
when i started just by running
make-zipball.sh
, it looked like i needed toapt install babel
. but that took me down the wrong path, it took a while to figure out that i needed to justnpm install
from your directory.also, although
node
is on myPATH
and normally runs fine, for some reason your scripts required it to be available from/usr/bin/
- in my case:sudo ln -s ~/nodejs/node-v7.9.0-linux-x64/bin/node /usr/bin/
incidentally, is there any way to use something like
test/local.js
to serve the handler in a standalone local mode, so new clones can get their renderings without setting up a cloud service?thanks!