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
I just installed it on a new Eclipse installation and the same ng command that was working on my earlier installation seems to be NOT working any more. Was the 1.2.0-SNAPSHOT recently updated / modified? I noticed a couple of changes:
Previously, the output was redirected to Eclipse Console and now it is launched in a Terminal
Previously, the command node <path_to_ng_from_preferences> build/serve was executed but now it just launches the ng build which fails as I do not have ng added to my system Path variable and neither can I add it due to corporate policies
Previously, the output was redirected to Eclipse Console and now it is launched in a Terminal
Indeed, I'm doing a big refactoring to use terminal instead of console to benefit with syntax coloration of the cli, replay the command (or an another) inside terminal, answer to some cli question ("override it?" like)
Which OS do you use?
Previously, the command node <path_to_ng_from_preferences> build/serve was executed but now it just launches the ng build which fails as I do not have ng added to my system Path variable and neither can I add it due to corporate policies
Now <path_to_ng_from_preferences> should be the directory which contains the "ng" / "ng.cmd". Please check the CLI Preferences (I have improved too this preferences to see the CLI Version, CLI Path).
At the end, I suggest you to use @angular/cli and not angular-cli which is now old.
Now <path_to_ng_from_preferences> should be the directory which contains the "ng" / "ng.cmd". Please check the CLI Preferences (I have improved too this preferences to see the CLI Version, CLI Path).
Yes I do see that, but I also see a problem here, if I add the physical path by browsing file system it is able to recognize and show the CLI Version and path as you have said, but if I use eclipse environment variable (like "${project_loc:node_modules/.bin}") or use workspace path by "Browse Workpsace" and pointing to the exact same path, it throws the error that it is not able to find it. The path in question here is the.bin folder in my project's node_modules.
The problem here is that, even if it recognizes the path and shows the CLI version and path in preferences, but when it executes the command it never uses that path, instead it seems to expect a global ng installation and therefore executes the "ng serve" command instead of the earlier command "node <path_to_ng_from_preferences>/ng serve" which has been working fine for me
At the end, I suggest you to use @angular/cli and not angular-cli which is now old.
Now, I think I know where the issue is, actually since I am doing this on my work laptop which does not give me admin privileges and therefore the PATH variable is not set. Is it possible to use the whole custom path for running the command instead of setting it to the PATH variable?
Since, I had node installed using the installer it does exist already in my path, adding ng would take a lot of bureaucracy which I want to avoid. So, if you can just allow ng to run withe the full path it would suffice.
My PATH is definitely not empty as I have other entries along with the node one
No it is not there, as when I run Eclipse with this plugin as you said it tries to add to my Path variable before the terminal launches which the system would not allow as I do not have admin access. Node was installed by a admin user which added the node path to PATH so the node path is already there
@sayantansinha I have added a checkbox "Execute ng with file?" to execute ng with the ng.cmd file. So you must select the directory of ng (like today) and select this checkbox.
We have a problem with build since textmate.java was migrated to Eclipse.org. Once this problem will be fixed you will able to reinstall 1.2.0-SNAPSHOT to test this new preference.
Ok got it, will wait for your update then to reinstall. Btw, is there any logs where I can check what is going on in the background, might help you with narrowing down the issue. It sounds to me like an issue with work laptops where admin rights are restricted.
It sounds to me like an issue with work laptops where admin rights are restricted.
Yes perhaps the update of Path that it is done before the open of terminal is not applied in this context? I cannot test that. If you can execute typescript.java with sources and debug it, it should be very cool.
With the new preference it works now as it is using the full path. Thanks.
However, once it is enabled you cannot remove it from preferences.
One additional thing that you might look into, if I run one of the commands with a set preference then the "Eclipse->Run Configuration" option stores that preference permanently, and it does not change if I change the Eclipse preferences for Angular CLI, so it continues to run with the previous preference configuration. Should it behave like that? Or should it always pick up the latest preference? Just a thought tha tyou might want to consider.
Activity
angelozerr commentedon Mar 8, 2017
Indeed, I'm doing a big refactoring to use terminal instead of console to benefit with syntax coloration of the cli, replay the command (or an another) inside terminal, answer to some cli question ("override it?" like)
Which OS do you use?
Now <path_to_ng_from_preferences> should be the directory which contains the "ng" / "ng.cmd". Please check the CLI Preferences (I have improved too this preferences to see the CLI Version, CLI Path).
At the end, I suggest you to use @angular/cli and not angular-cli which is now old.
sayantansinha commentedon Mar 8, 2017
Windows 7
Yes I do see that, but I also see a problem here, if I add the physical path by browsing file system it is able to recognize and show the CLI Version and path as you have said, but if I use eclipse environment variable (like "${project_loc:node_modules/.bin}") or use workspace path by "Browse Workpsace" and pointing to the exact same path, it throws the error that it is not able to find it. The path in question here is the.bin folder in my project's node_modules.
The problem here is that, even if it recognizes the path and shows the CLI version and path in preferences, but when it executes the command it never uses that path, instead it seems to expect a global ng installation and therefore executes the "ng serve" command instead of the earlier command "node <path_to_ng_from_preferences>/ng serve" which has been working fine for me
Yes, I am using @angular/cli
sayantansinha commentedon Mar 9, 2017
Any help on this would be really great
angelozerr commentedon Mar 10, 2017
Before opening the terminal to execute a "ng" command, the "PATH" env is updated by adding at first your node path and ng path.
After that the terminal is opened by executing the "ng build" by the Eclipse launch, could you type:
echo %PATH%And check that your
$project/node_modules/.bindirectory is in the path.sayantansinha commentedon Mar 10, 2017
Now, I think I know where the issue is, actually since I am doing this on my work laptop which does not give me admin privileges and therefore the PATH variable is not set. Is it possible to use the whole custom path for running the command instead of setting it to the PATH variable?
angelozerr commentedon Mar 10, 2017
At first I have decided to use
PATHenv variable because :ngneedsnode. So even if you can call ng file, if your node is not in your path, it will not work.If you type:
echo %PATH%What is your Path? Is it empty? If it that it's strange because I create this variable even if it doesn't exists.
If it is empty, please reinstall 1.2.0-SNAPSHOT and tell me if your PATH is empty or not. Thanks
sayantansinha commentedon Mar 10, 2017
Since, I had node installed using the installer it does exist already in my path, adding ng would take a lot of bureaucracy which I want to avoid. So, if you can just allow ng to run withe the full path it would suffice.
My PATH is definitely not empty as I have other entries along with the node one
angelozerr commentedon Mar 10, 2017
But have you in your PATH env the path of ng directory that you have customized with preferences?
sayantansinha commentedon Mar 10, 2017
No it is not there, as when I run Eclipse with this plugin as you said it tries to add to my Path variable before the terminal launches which the system would not allow as I do not have admin access. Node was installed by a admin user which added the node path to PATH so the node path is already there
angelozerr commentedon Mar 10, 2017
I update the PATH before opening the terminal. Please reinstall 1.2.0-SNAPSH
sayantansinha commentedon Mar 10, 2017
Ok already shut my laptop, will try it out tomorrow and update. Just curious, did you change this after I reported the issue?
angelozerr commentedon Mar 10, 2017
Indeed that very strange. If you can debug it, it should be very cool.
Add "Execute ng with file?" preferences. See
angelozerr commentedon Mar 10, 2017
@sayantansinha I have added a checkbox "Execute ng with file?" to execute ng with the ng.cmd file. So you must select the directory of ng (like today) and select this checkbox.
We have a problem with build since textmate.java was migrated to Eclipse.org. Once this problem will be fixed you will able to reinstall 1.2.0-SNAPSHOT to test this new preference.
sayantansinha commentedon Mar 11, 2017
Ok got it, will wait for your update then to reinstall. Btw, is there any logs where I can check what is going on in the background, might help you with narrowing down the issue. It sounds to me like an issue with work laptops where admin rights are restricted.
angelozerr commentedon Mar 12, 2017
Yes perhaps the update of Path that it is done before the open of terminal is not applied in this context? I cannot test that. If you can execute typescript.java with sources and debug it, it should be very cool.
sayantansinha commentedon Mar 13, 2017
With the new preference it works now as it is using the full path. Thanks.
However, once it is enabled you cannot remove it from preferences.
One additional thing that you might look into, if I run one of the commands with a set preference then the "Eclipse->Run Configuration" option stores that preference permanently, and it does not change if I change the Eclipse preferences for Angular CLI, so it continues to run with the previous preference configuration. Should it behave like that? Or should it always pick up the latest preference? Just a thought tha tyou might want to consider.