Comments (16)
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.
from angular-eclipse.
Which OS do you use?
Windows 7
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.
Yes, I am using @angular/cli
from angular-eclipse.
Any help on this would be really great
from angular-eclipse.
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/.bin
directory is in the path.
from angular-eclipse.
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?
from angular-eclipse.
At first I have decided to use PATH
env variable because :
ng
needsnode
. So even if you can call ng file, if your node is not in your path, it will not work.- it avoids to select ng.cmd for windows and ng for other OS, so your preferences of ng is the same for any OS.
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
from angular-eclipse.
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
from angular-eclipse.
But have you in your PATH env the path of ng directory that you have customized with preferences?
from angular-eclipse.
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
from angular-eclipse.
No it is not there, as when I run Eclipse with this plugin
I update the PATH before opening the terminal. Please reinstall 1.2.0-SNAPSH
from angular-eclipse.
Ok already shut my laptop, will try it out tomorrow and update. Just curious, did you change this after I reported the issue?
from angular-eclipse.
Indeed that very strange. If you can debug it, it should be very cool.
from angular-eclipse.
@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.
from angular-eclipse.
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.
from angular-eclipse.
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.
from angular-eclipse.
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.
from angular-eclipse.
Related Issues (20)
- ng command not recognized in eclipse preference HOT 43
- can't install HOT 1
- Angular template editor doesn't work on linux HOT 3
- Getting [ts] errors on all of my HTML files HOT 5
- Add to workspace Angular Project downloaded from repository HOT 6
- Files and folders in project get locked
- Workspace build hangs at 66% HOT 1
- ng new not working with latest cli
- ng serve using wrong node/npm version
- Not able to create a new project HOT 8
- Eclipse update site not working HOT 2
- Files are deleted when switching to another GIT branch
- Not able to create project in linux with 1.3.0 version of angular plugin
- Create Angular project not initializing anything but metadata HOT 3
- Contributor guide HOT 4
- after plugin installed, no angular wizard available
- Getting started is not enough HOT 4
- got a software not signed error
- Unable to build project after Angular install HOT 3
- angular-cli doesn't work with ngWizards -> Location doesn't belong to an @angular/cli project. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-eclipse.