kappa icon indicating copy to clipboard operation
kappa copied to clipboard

Example doesn't run

Open jacklund opened this issue 8 years ago • 1 comments

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

The first failure is in the transpile step:

npm run transpile

> [email protected] transpile /home/admin/git/kappa/examples/api_gateway_proxy
> babel --presets es2015 src --out-dir bin

sh: 1: babel: not found

npm ERR! [email protected] transpile: `babel --presets es2015 src --out-dir bin`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] 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

> [email protected] 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! [email protected] transpile: `babel --presets es2015 src --out-dir bin`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] 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

> [email protected] 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! [email protected] transpile: `babel --presets es2015 src --out-dir bin`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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.

jacklund avatar Mar 16 '17 16:03 jacklund

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

monorkin avatar Mar 17 '17 18:03 monorkin