You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Eclipse preferences: The '/usr/local/lib/node_modules/@angular/cli/bin/ng' is not a ng file. #64
The '/usr/local/lib/node_modules/@angular/cli/bin/ng' is not a ng file.
However there is a shell script ng file in the location:
$ ls -ltr /usr/local/lib/node_modules/@angular/cli/bin/
total 16
-rwxr-xr-x 1 nobody staff 5982 Mar 14 02:35 ng
I am not sure if this a permission problem or that the eclipse plugin is expecting a different format ng file. Like I said this ng file in the above location is a shell script. The eclipse plugin found the location by itself - I did not choose it.
I did previously run this command before installing the angular2-eclipse plugin:
sudo npm install -g @angular/cli
Because of this configuration problem if I do:
File ==> New Angular 2 Project
and try to create a new project it shows in the Terminal window:
~/Documents/workspace$ ng new bling
bash: ng: command not found
Incidentally because of this failure, no project is created at all on the file system when trying to create a Angular 2 project.
Finally if I type on the command line :
which ng
I get:
$ which ng
/usr/local/bin/ng
Maybe the eclipse plugin could try that location instead. For some reason If in the above preference section of eclipse and I select the radio button "Use ng custom file" and try and navigate to "/usr/local/bin/ng" I cannot access the path. Maybe this a Mac feature of eclipse.
Not sure if I have given enough information for you to know what the problem is.
Thank you for your time and your contribution to this plugin
The '/usr/local/lib/node_modules/@angular/cli/bin/ng' is a JavaScript file which must be executed with node When you install @angular/cli globally, it install the /usr/local/bin/ng which basicly does 'node /usr/local/lib/node_modules/@angular/cli/bin/ng'.
So the well file is "/usr/local/bin/ng" as you have said ($ which ng).
For some reason If in the above preference section of eclipse and I select the radio button "Use ng custom file" and try and navigate to "/usr/local/bin/ng" I cannot access the path. Maybe this a Mac feature of eclipse.
The "Use ng custom file" waits for a directory (and not the file) which contains the ng/ng.cmd file. So you should select "/usr/local/bin/" and not "/usr/local/bin/ng".
When Terminal is opened, it adds in the env path this directory before opening the terminal. If you have not admin privilege, you can use directly the ng file. See #56 (comment)
i tried "/usr/local/bin/" as you said, i also tried to install cli local in my workspace and i always get the same error.
I guess it's the @ in the path, because "/usr/local/bin/ng" is only a symbolic link to '/usr/local/lib/node_modules/@angular/cli/bin/ng'
and if i want to cd to the cli bin folder i have to escape the @ like this
cd /usr/local/lib/node_modules/\@angular/cli/bin/
i guess you also have to escape the @ in your call, if this does not fix it i'm out of ideas how to get it working
if i execute a
export PATH=$PATH:/usr/local/lib/node_modules/\@angular/cli/bin
in the terminal it works for me
but i still get problems when i try to run ng serve etc, even when i do a export in that terminal window
Once your ng project is created, you should have a .bin folder inside your project which contains the ng. Try to modify this properties with ng custom file.
@tokiaquino are you using latest (1.4 Snapshot) version?
I just had a look at my installation and there it says "use global preferences" instead of "use global" as in your case.
In the latest version it is possible, to use the CLI-Installation you configure in the global preferences, instead of just the global CLI-Installation.
@Springrbua i confirm on monday because is in my work computer, but i have the same problem when configure global preference like i mention on previous comment
@tokiaquino yea there were a few issues with the cli-settings in the 1.3 version. The ones I know about should be fixed with latest snapshot.
You might need to change the update side to get the update to the latest version.
@josersleal please note that we develop this plugin in our free time. More we have Windows OS, it's difficult for me and @Springrbua to test with another OS. So if you have problem, please help us, thanks.
For run tests, please give us suggestion, I don't know how to write tests for this issue, please help us.
@josersleal@angelozerr I am waiting for my new notebook, which I should get the next weak.
I'll then take a look at it, I know, the CLI-Settings is causing some trouble... @josersleal as @angelozerr said, we are working on this in our free time. Also it is an open source project, so you are free to contribute to it.
Any help is very welcome :)
With 1.3.x on Mac I also saw the original error reported in this issue (though with a different install location of ng, but I guess that doesn't matter). After upgrading to current 1.4.x, the error went away.
However, I had to manually de-install the 1.3.x feature, because the feature name seems to have changed between versions. Before de-installing the old feature, I was seeing two "Angular" preference sections, out of which one was still showing the reported error.
So as I'd see it, the original error is fixed in 1.4.x on Mac ...
With 1.4.0 (SNAPSHOT), nodejs 8.9.1 and angular 1.5.4 (installed globally) it worked - though it keeps offering me nodejs 6.x-something (embedded) by default - which is a bit annoying as I am not intending to use that.
@divStar Please reinstall 1.4.0 (SNAPSHOT), nodejs 8.9.1 should be available as embed nodejs (see angelozerr/typescript.java#222), hope it will work for you.
@angelozerr Thanks for the suggestion. I see a number of files in that directory. I don't know what to do with these files. You have a few guiding instructions ? Cheers.
@angelozerr After removing the plugin, I tried to add software from the given url but my Eclipse could not perform the operation and hanged trying to find alternate solutions.
I'm getting the same error pointed by @javaspeak. The ng file exists and it's working fine, but some validation is telling the file is not a ng file (that is not true). I have installed globally Angular CLI version 8.0.4.
Eclipse version: 2019-06
Plugin version: latest (just installed it by Eclipse Marketplace
@Tony-Esales the Plugin hasn't been updated since a while and the Angular CLI changed quite a bit in that time. My guess is, that the command used to check the validity of the ng-file has been changed or even removed.
Activity
angelozerr commentedon Mar 24, 2017
The '/usr/local/lib/node_modules/@angular/cli/bin/ng' is a JavaScript file which must be executed with
nodeWhen you install@angular/cliglobally, it install the/usr/local/bin/ngwhich basicly does 'node /usr/local/lib/node_modules/@angular/cli/bin/ng'.So the well file is "/usr/local/bin/ng" as you have said ($ which ng).
The "Use ng custom file" waits for a directory (and not the file) which contains the ng/ng.cmd file. So you should select "/usr/local/bin/" and not "/usr/local/bin/ng".
When Terminal is opened, it adds in the env path this directory before opening the terminal. If you have not admin privilege, you can use directly the ng file. See #56 (comment)
tiramon commentedon Mar 30, 2017
i just tried to set this up on a mac too
i tried "/usr/local/bin/" as you said, i also tried to install cli local in my workspace and i always get the same error.
I guess it's the @ in the path, because "/usr/local/bin/ng" is only a symbolic link to '/usr/local/lib/node_modules/@angular/cli/bin/ng'
and if i want to cd to the cli bin folder i have to escape the @ like this
cd /usr/local/lib/node_modules/\@angular/cli/bin/
i guess you also have to escape the @ in your call, if this does not fix it i'm out of ideas how to get it working
if i execute a
export PATH=$PATH:/usr/local/lib/node_modules/\@angular/cli/bin
in the terminal it works for me
tiramon commentedon Mar 30, 2017
but i still get problems when i try to run ng serve etc, even when i do a export in that terminal window
it tells me
node_modules appears empty, you may need to run
npm installangelozerr commentedon Mar 30, 2017
Thanks for this information.
Once your ng project is created, you should have a
.binfolder inside your project which contains the ng. Try to modify this properties with ng custom file.angelozerr commentedon Apr 9, 2017
@tiramon please reinstall 1.2.0 and tell me if your problem dispapear, thanks
angelozerr commentedon Apr 12, 2017
@tiramon could you tell me if it works now please?
angelozerr commentedon Apr 17, 2017
None answer, I close this issue. @tiramon please install 1.2.0 release, if you have problem again, please reopen it.
tokiaquino commentedon Nov 3, 2017
@angelozerr
I have the same problems when configure Eclipse global preferences
tokiaquino commentedon Nov 3, 2017
And when create an Agular Project, stay " Searching for global Angular CLI..."

tokiaquino commentedon Nov 3, 2017
And when create an Agular Project, stay " Searching for global Angular CLI..."
angelozerr commentedon Nov 3, 2017
@Springrbua could you help us with this issue please?
probert94 commentedon Nov 4, 2017
@tokiaquino are you using latest (1.4 Snapshot) version?
I just had a look at my installation and there it says "use global preferences" instead of "use global" as in your case.
In the latest version it is possible, to use the CLI-Installation you configure in the global preferences, instead of just the global CLI-Installation.
tokiaquino commentedon Nov 4, 2017
@Springrbua i confirm on monday because is in my work computer, but i have the same problem when configure global preference like i mention on previous comment
probert94 commentedon Nov 4, 2017
@tokiaquino yea there were a few issues with the cli-settings in the 1.3 version. The ones I know about should be fixed with latest snapshot.
You might need to change the update side to get the update to the latest version.
13 remaining items
angelozerr commentedon Nov 30, 2017
@josersleal please note that we develop this plugin in our free time. More we have Windows OS, it's difficult for me and @Springrbua to test with another OS. So if you have problem, please help us, thanks.
For run tests, please give us suggestion, I don't know how to write tests for this issue, please help us.
probert94 commentedon Nov 30, 2017
@josersleal @angelozerr I am waiting for my new notebook, which I should get the next weak.
I'll then take a look at it, I know, the CLI-Settings is causing some trouble...
@josersleal as @angelozerr said, we are working on this in our free time. Also it is an open source project, so you are free to contribute to it.
Any help is very welcome :)
jfrantzius commentedon Dec 1, 2017
With 1.3.x on Mac I also saw the original error reported in this issue (though with a different install location of ng, but I guess that doesn't matter). After upgrading to current 1.4.x, the error went away.
However, I had to manually de-install the 1.3.x feature, because the feature name seems to have changed between versions. Before de-installing the old feature, I was seeing two "Angular" preference sections, out of which one was still showing the reported error.
So as I'd see it, the original error is fixed in 1.4.x on Mac ...
angelozerr commentedon Dec 1, 2017
@jfrantzius thanks for your feedback!
@divStar Please reinstall 1.4.0 (SNAPSHOT), nodejs 8.9.1 should be available as embed nodejs (see angelozerr/typescript.java#222), hope it will work for you.
stephaneeybert commentedon Mar 15, 2018
On Eclipse Neon 3 (4.6.3) and Angular Eclipse 1.3.0 I also get the same message:
On Lubuntu 16.04
angelozerr commentedon Mar 15, 2018
@stephaneeybert please try 1.4.0 which is not released https://github.com/angelozerr/angular-eclipse/wiki/Installation-Update-Site#140-snapshot-snapshot
stephaneeybert commentedon Mar 16, 2018
@angelozerr Thanks for the suggestion. I see a number of files in that directory. I don't know what to do with these files. You have a few guiding instructions ? Cheers.
probert94 commentedon Mar 16, 2018
@stephaneeybert you only need to use http://oss.opensagres.fr/angular-eclipse/snapshot/ as update site for the plugin.
I would uninstall the older version (1.3.0) first and then use this URL to install the plugin.
stephaneeybert commentedon Mar 16, 2018
@angelozerr After removing the plugin, I tried to add software from the given url but my Eclipse could not perform the operation and hanged trying to find alternate solutions.
sayantansinha commentedon Aug 17, 2018
@angelozerr @Springrbua have you guys added support for Angular-CLI 6?
armita-burjwal commentedon Sep 25, 2018
Any update on this??
armita-burjwal commentedon Sep 26, 2018
After adding 1.4.0 when i create a new project it is showing " No Angular CLI installation found in global preferences."
Tony-Esales commentedon Jun 26, 2019
I'm getting the same error pointed by @javaspeak. The ng file exists and it's working fine, but some validation is telling the file is not a ng file (that is not true). I have installed globally Angular CLI version 8.0.4.
Eclipse version: 2019-06
Plugin version: latest (just installed it by Eclipse Marketplace
@angelozerr Can you help me?
probert94 commentedon Jun 26, 2019
@Tony-Esales the Plugin hasn't been updated since a while and the Angular CLI changed quite a bit in that time. My guess is, that the command used to check the validity of the ng-file has been changed or even removed.
angelozerr commentedon Jun 26, 2019
I'm sorry guys but I have no time to continue this project. The new Angular support inside Eclipse is inside the new project https://github.com/eclipse/wildwebdeveloper but ng is not included for the moment eclipse-wildwebdeveloper/wildwebdeveloper#147