core: ./ace - No such file or directory

I created a fresh droplet on Digital Ocean (The Node one click app) and followed the starting piece in the documentation to create yardstick.

When i try and use Ace i get:

adonis@adonis:~/yardstick$ ./ace
/usr/bin/env: node --harmony_proxies: No such file or directory

which node gives me /usr/bin/node

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 33 (11 by maintainers)

Most upvoted comments

Ok i found hack for Linux… http://sambal.org/2014/02/passing-options-node-shebang-line/ It should be:

#!/bin/sh 
":" //# comment; exec /usr/bin/env node --harmony_proxies "$0" "$@"

'use strict'
/*
|--------------------------------------------------------------------------
|   Running Console Commands
|--------------------------------------------------------------------------
|
|  Here we invoke console commands registered under Ace store.
|
*/
const kernel = require('./bootstrap/kernel')
kernel()

It works for me, can anyone test it on OSX?

Hey guys, you also may use node ace make:[command] <params> ... from the Adonis project folder, and it does’n matter what OS you are using, just need NodeJS to run.

@vizo Kind of works great, have to test it on Windows too

Sure, the problem is --harmony flag does not work when using /usr/bin/env node. It needs to be /usr/bin/node.

Since the installation of NodeJs is different from every OS and also depends upon the way you have installed NodeJs.

I will add a command to adonis-cli to fix the ace file with the correct location of node on the current OS.

You need to use ./ace and not .ace to use it inside your terminal. You can also directly use it with node via node ace.

$ node ace make:controller XXX

added an alias like alias ace="node --harmony-proxies ./ace", so I just go ace make:model Cool in the app root and it works.

Great!! @vizo it works 👍

@dan-gamble Make use of node --harmony_proxies ace and your command.

It is a combination of several issues, i will be writing a blog post + a command to fix ace file.