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

./ace - No such file or directory #141

Closed
dan-gamble opened this issue Apr 14, 2016 · 33 comments
Closed

./ace - No such file or directory #141

dan-gamble opened this issue Apr 14, 2016 · 33 comments
Assignees

Comments

@dan-gamble
Copy link

dan-gamble commented Apr 14, 2016

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

@dan-gamble
Copy link
Author

Node version 4.4.3 btw

@bitkidd
Copy link

bitkidd commented Apr 14, 2016

Are you using nvm or just clean node install from apt? As I can see, without nvm.

@thetutlage
Copy link
Member

@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.

@thetutlage thetutlage self-assigned this Apr 15, 2016
@dan-gamble
Copy link
Author

I tried both global node & nvm.

That worked @thetutlage! I'll just set up an alias to use in the interim :)

@thetutlage
Copy link
Member

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.

@dan-gamble
Copy link
Author

Awesome, thanks for the help :)

@glexposito
Copy link

Hi Guys, I ran adonis fix and the issue was not fixed for me. I am using antergos. Any idea?

@vizo
Copy link

vizo commented Jul 15, 2016

It can't work ...

http://stackoverflow.com/questions/8108917/why-does-passing-arguments-to-the-command-in-an-env-invocation-not-work

On Linux, the entire string following the interpreter name is passed as a single argument to the interpreter, and this string can include white space. [1] Thus, command line arguments are not split, and env command is trying to execute "node --harmony_proxies" file, which obviously could not be found

@vizo
Copy link

vizo commented Jul 15, 2016

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?

@thetutlage
Copy link
Member

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

@juan55860
Copy link

Great!! @vizo it works 👍

@artemidas
Copy link

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.

@rindia
Copy link

rindia commented Oct 22, 2016

C:\Users\Admin\demowork>./ace
'.' is not recognized as an internal or external command,
operable program or batch file.

@rindia
Copy link

rindia commented Oct 22, 2016

C:\Users\ROHIT SAINI\ya>./ace
'.' is not recognized as an internal or external command,
operable program or batch file.

how to fix this problem ?

@navdeepsingh
Copy link

In windows env use
node --harmony-proxies ace migration:run

Like above

On Oct 22, 2016 6:44 PM, "rindia" notifications@github.com wrote:

C:\Users\Admin\demowork>./ace

'.' is not recognized as an internal or external command,

operable program or batch file.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#141 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AC1M03xt2RgXL3-MJIhJU7KhoT9mvOwyks5q2gw8gaJpZM4IHwv0
.

@iben12
Copy link

iben12 commented Nov 8, 2016

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.

@raulvillca
Copy link

i have an issue when i tried to create a new project:

✔ Your current Node.js & npm version match the AdonisJs requirements!
✖ An error occured while trying to access "/Documents/WKS_SERVER/my_chat" directory
Cannot read property 'F_OK' of undefined

@RomainLanz
Copy link
Member

RomainLanz commented Jan 30, 2017

May you create a new issue in the adonis-cli repository and specify which OS you use (it looks like Windows) and which command do you run @raulvillca ?

@thetutlage
Copy link
Member

@RomainLanz Fixed. Node.js v6.2 has fs.constants as undefined whereas v6.3 and later have fs.constants as defined. The weird part is versions earlier than v6.2 also has fs.constants defined.

@RomainLanz
Copy link
Member

Good to know! Thanks.

@pushkertiwari
Copy link

.ace is not working , please suggest me how to get rid of this issue

@RomainLanz
Copy link
Member

Dear @pushkertiwari !

What's your problem?

@pushkertiwari
Copy link

.ace make:controller home is not working , i have tried all the ways , but cli of adnois is not working in the terminal , always giving the isssue in the .ace is not found. @RomainLanz

@RomainLanz
Copy link
Member

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

@pushkertiwari
Copy link

thanks @RomainLanz , you have solved my problem.

@pushkertiwari
Copy link

@RomainLanz could you please help me in the autenication process of adnois js

@RomainLanz
Copy link
Member

@pushkertiwari Please join the gitter for those kind of questions

@DLUK44
Copy link

DLUK44 commented Aug 10, 2017

To run ace on Windows, create a file called ace.cmd in the root of your project with the following content

cd %~dp0
node ace %*

Now you can run ace make:view home (but NOT ./ace make:view home, so careful when following tutorials etc.)

@horiyomi
Copy link

horiyomi commented Aug 10, 2017 via email

@RomainLanz
Copy link
Member

Hey @DLUK44, @horiyomi !

First of all, thanks for the tips @DLUK44, we'll add that to the documentation for 4.0 if it's not already inside.

@horiyomi, may you create a new issue with the error you get?

@thetutlage
Copy link
Member

@RomainLanz

In 4.0 adonis proxy all the project specific commands. So instead of running ace <cmd>, you can do adonis <cmd>, which fixes all cross platform issues

@salvadorzepeda
Copy link

you should create a file named ace.js in the root with this code inside:


#!/usr/bin/env node

'use strict'
const kernel = require('./bootstrap/kernel')
kernel()

@lock
Copy link

lock bot commented Mar 11, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 11, 2020
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