Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README needs more guidance for n00b #7

Open
eflister opened this issue Apr 19, 2017 · 2 comments
Open

README needs more guidance for n00b #7

eflister opened this issue Apr 19, 2017 · 2 comments

Comments

@eflister
Copy link

when i started just by running make-zipball.sh, it looked like i needed to apt install babel. but that took me down the wrong path, it took a while to figure out that i needed to just npm install from your directory.

also, although node is on my PATH 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!

@TimothyGu
Copy link
Member

also, although node is on my PATH 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 exported; 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.

@eflister
Copy link
Author

eflister commented Apr 20, 2017

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


> [email protected] 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! [email protected] build: `echo $PATH && rm -rf lib && babel -d lib src`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants