Skip to content
This repository has been archived by the owner on Feb 17, 2020. It is now read-only.

Example doesn't run #1

Open
jacklund opened this issue Mar 16, 2017 · 1 comment
Open

Example doesn't run #1

jacklund opened this issue Mar 16, 2017 · 1 comment

Comments

@jacklund
Copy link

I'm trying to run your api_gateway_proxy example, and it fails.

The first failure is in the transpile step:

npm run transpile

> hello_world@1.0.0 transpile /home/admin/git/kappa/examples/api_gateway_proxy
> babel --presets es2015 src --out-dir bin

sh: 1: babel: not found

npm ERR! hello_world@1.0.0 transpile: `babel --presets es2015 src --out-dir bin`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the hello_world@1.0.0 transpile script.
npm ERR! This is most likely a problem with the hello_world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     babel --presets es2015 src --out-dir bin
npm ERR! You can get their info via:
npm ERR!     npm owner ls hello_world
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.16.0-4-amd64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "run" "transpile"
npm ERR! cwd /home/admin/git/kappa/examples/api_gateway_proxy
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/admin/git/kappa/examples/api_gateway_proxy/npm-debug.log
npm ERR! not ok code 0

So I did a npm install babel which brought me to the next error:

% npm run transpile

> hello_world@1.0.0 transpile /home/admin/git/kappa/examples/api_gateway_proxy
> babel --presets es2015 src --out-dir bin

/usr/bin/env: node: No such file or directory

npm ERR! hello_world@1.0.0 transpile: `babel --presets es2015 src --out-dir bin`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the hello_world@1.0.0 transpile script.
npm ERR! This is most likely a problem with the hello_world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     babel --presets es2015 src --out-dir bin
npm ERR! You can get their info via:
npm ERR!     npm owner ls hello_world
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.16.0-4-amd64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "run" "transpile"
npm ERR! cwd /home/admin/git/kappa/examples/api_gateway_proxy
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/admin/git/kappa/examples/api_gateway_proxy/npm-debug.log
npm ERR! not ok code 0

unfortunately, I'm running this on Debian, so even after installing node it doesn't work, because Debian installs it as nodejs rather than node.

Once I symlinked node to nodejs, I get this error:

% npm run transpile

> hello_world@1.0.0 transpile /home/admin/git/kappa/examples/api_gateway_proxy
> babel --presets es2015 src --out-dir bin

You have mistakenly installed the `babel` package, which is a no-op in Babel 6.
Babel's CLI commands have been moved from the `babel` package to the `babel-cli` package.

    npm uninstall -g babel
    npm install --save-dev babel-cli

See http://babeljs.io/docs/usage/cli/ for setup instructions.

npm ERR! hello_world@1.0.0 transpile: `babel --presets es2015 src --out-dir bin`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hello_world@1.0.0 transpile script.
npm ERR! This is most likely a problem with the hello_world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     babel --presets es2015 src --out-dir bin
npm ERR! You can get their info via:
npm ERR!     npm owner ls hello_world
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.16.0-4-amd64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "run" "transpile"
npm ERR! cwd /home/admin/git/kappa/examples/api_gateway_proxy
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/admin/git/kappa/examples/api_gateway_proxy/npm-debug.log
npm ERR! not ok code 0

At which point I give up. 😄

It might be helpful to include a README with your example to explain what the assumed dependencies are, and how to set them up in various environments.

@monorkin
Copy link
Owner

Hey! Sorry for not responding earlier, I was quite busy the last few days.
I'll take a look at this over the weekend.

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

No branches or pull requests

2 participants