-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Version of @angular/compiler-cli needs to be 2.3.1 or greater. Current version is "undefined". #5558
Comments
Same issue versions: message: |
I encountered the same issue Version of @angular/compiler-cli needs to be 2.3.1 or greater. Current version is "undefined". |
The project needs a dev dependency for @angular/compiler-cli. |
Thank you @clydin That was correct. I migrated angular-cli from beta to rc.0 and this step was not part of the steps. |
any update? i am facing the same issues. |
any update ? i also have the same issues |
yes, follow @clydin 's response... |
but right now i am using angular-cli v1.0.0-beta.17, and i found that the @ngtools/webpack requires 2.3.1. i have tried to upgrade the cli to a higher version, it will throw plenty of exceptions. i just wanna stick with the ready to build version, rather than upgrade all the version. |
here is my package.json
|
the root problem is 1.0.0-beta.17 angular-cli using "@ngtools/webpack": "latest", and which the latest is not compatible to the "angular-cli": "1.0.0-beta.17", please fix! |
Same for 1.0.0-beta.18. A compiler-cli dev dependency (our angular version is 2.1.1) as suggested by @clydin does not work. |
Can confirm that @clydin's method seems to require a whole bunch of other peer dependancy changes when using 2.1.0 |
my problem is in this file how can the @ngtools/webpack using latest? |
|
@aeacusvol that worked for me, thanks! |
Unfortunately, the fix I suggested can only solve the case of the For those using beta versions, it is strongly recommended to upgrade to the latest RC. Due to the inherent nature of beta versions, active support of past beta versions is not currently viable. There is also an extensive list of bug fixes and feature improvements since the early betas. For those interested in upgrading, there is a guide detailing the necessary steps which can be found here: https://github.com/angular/angular-cli/wiki/stories-rc-update |
@aeacusvol's solution no good on ng@2.1.0 for me at least |
@mildfuzz are you building with global installation of cli? You might need to |
@clydin actually your solution doesn't work for me, since i am doing clean CI build every time, once your dependency is broken all the CI build will be broken. so please help to correct this issue. |
@clydin your recommended fix (adding a dev dependency for @angular/compiler-cli) makes no difference in the result for me:
Open to other suggestions. I am on a beta version of the CLI (18 to be precise), and if upgrading to the latest CLI, which seems also to require updating a whole bunch of angular dependencies is the only way to fix this, then I am going to be very unhappy. Half dozen separate but dependent projects all have to be coordinated with the version updates, and inevitable issues that go along with those. Darn good thing I didn't try this before my big demo yesterday. :/ I agree with the earlier sentiment expressed that this must be a repeatable process. If it worked a week ago (which it did), it should work today (which it doesn't), especially when there were no dependency changes in between. I'm not sure how it's even possible to make it fail like this, unless the npm versioning system means absolutely nothing. |
Since you're on an old version of angular and a very old beta of the CLI you'll need to use @aeacusvol suggestion instead.
Also please note that these are beta versions; expect them to break. |
@clydin thanks for the tip, but unfortunately that doesn't work either. Exactly the same result. I guess I've got YAAVU (Yet Another Angular Version Update) to slog through now. You understand my point about how if this worked once it should always work, right? This worked just fine a week ago. Now it doesn't. And no changes to our dependencies in between. The process has to be repeatable or the whole npm packaging and versioning system cannot be trusted. The only way I can think of for it to break like this is if someone publishes a package with breaking changes without rev-ing the version number or bothering to say anything about it. And that someone was not me. But I'm picking up the pieces. And to your comment about my "very old" verison of angular, let's be very precise: that was 6 months ago. Not exactly a geological age. |
@aeacusvol nope, my deploy task specifically targets the version within the package modules folder:
|
Heya, I just want to chime in even though @clydin has already offered a number of solutions. This issue is related to #5118, and the fact that on older versions of the CLI the We've since fixed I'm sorry that this release wrecked havoc in older releases, and that it has caused you to have to spend time updating and fixing packages. This isn't something that you can expect to be fixed without an update on your side though. I'm sorry but it's just not. The only solution that I think can help really old versions is to force the I'd also like to highlight this comment:
I understand that this is desirable. But you do not get that guarantee out of the box with |
Got my beta.21 working again thanks to @aeacusvol's solution |
So how about updating angular CLI, then just starting a new app (ng new ) and using the packages from the new app? As my solution doesnt have many third party dependencies outside of corre angular. Should that work? Here is the angular-cli Git Page details:If you're using Angular CLI beta.28 or less, you need to uninstall angular-cli package. It should be done due to changing of package's name and scope from angular-cli to @angular/cli: npm uninstall -g angular-cli Global package: npm uninstall -g @angular/cli rm -rf node_modules dist # use rmdir /S/Q node_modules dist in Windows Command Prompt; use rm -r -fo node_modules,dist in Windows PowerShell |
@filipesilva points all received and accepted here but it's a huge bummer when these things happen (I've come to assume they are unfortunate but inevitable when working with node + npm). While it sucks, the versions facing the issue were clearly npm shrinkwrap however does not help with this one due to the very loose |
I have a solution if you aren't ready to upgrade angular-cli or @angular/cli. It can be done using shrinkwrap and some hoop-jumping. Even though some hackery is invloved, it does result in a fileset that can perform a fresh build from source.
That's it, now shrinkwrap.json will contain the locked down dependenies that will work for you! From here you should be able to delete node_modules and do 'npm install' successfully. One more thing, because we're now using a local version of 'ng', you'll need do update your 'scripts' section of package.json - replace any reference to 'ng' with |
The solution @joshdanhall suggested works for me. |
There are some environment settings that have to be changed as well in /angular-cli.join I would share but I'm not at my computer!!! Sorry. When I: ng serve, the prompt responded with the chages I needed. But to get to that point, I just built a new app: ng new , then copied over the node modules, and pasted in the new dependencies to my existing package.json After that, I: ng serve - after that I got the response with the environment setting changes and vwa-la! |
.json * |
FYI: as we're upgrading modules for RC4 compliance we temporarily tweaked the broken build to use an unzipped node_modules from a working build (luckily preserved on several dev boxes) instead of running npm install. This buys you time to keep adding/building the old code while you upgrade a new branch to use angular-cli RC4 (and beyond). Hopefully this helps somebody. |
Yep, same problem here, I did similar thing as @Cogitaria, created .tbz2 from working node_modules directory on dev machine, commited it (unfortunately) and tweaked CI to unpack this archive instead of |
Version of @angular/compiler-cli needs to be 2.3.1 or greater. Current version is "undefined" Even I am facing the same issue while installing CLI version 1.0.0-beta-20-4. Please let me know how can resolve this issue Thanks in Advance |
#Version of @angular/compiler-cli needs to be 2.3.1 or greater. Current version is "undefined". i found this issue , when i upgraded angular cli and create a new project , after run ng serve command this error occurred . please help me what can i do right now in this situation |
you should have to uninstall angular cli properly then after install again
angular cli
npm install -g @angular/cli
…On Wed, May 3, 2017 at 6:23 AM, Jonathan Prass Martins < ***@***.***> wrote:
Cannot install @***@***.***, it keeps falling to 1.0.0-beta.17
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5558 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AXkePVagBZcg1_sPpx1RuNaGsumLhMkOks5r19ctgaJpZM4Mklhk>
.
--
ATTA UR REHMAN
atta.rehman8123@gmail.com
Software Developer
|
I think you shoud update to angualr cli 1.0 : remove local project package:rm -rf node_modules dist # use rmdir on Windows |
After uninstall it type "which ng" and remove the symlink. The installation should create a new one pointed to the correct path. |
I have node 6.11.0 and ubuntu 14.04 but it is not installing angular cli I am getting following error `npm ERR! git clone --template=/home/saqlain/.npm/_git-remotes/_templates --mirror git@github.com:angular/cli.git /home/saqlain/.npm/_git-remotes/git-github-com-angular-cli-git-05516032: Cloning into bare repository '/home/saqlain/.npm/_git-remotes/git-github-com-angular-cli-git-05516032'... npm ERR! Command failed: git clone --template=/home/saqlain/.npm/_git-remotes/_templates --mirror git@github.com:angular/cli.git /home/saqlain/.npm/_git-remotes/git-github-com-angular-cli-git-05516032 npm ERR! Please include the following file with any support request: |
I get this error using VS Code on Zorin Linux (Ubuntu 16.04):
|
@Alfetta159 I think this is caused by an old version of webpack: #8806 |
Hi @clydin tried that no solution |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
angular-cli: 1.0.0-beta.28.3
node: 6.10.0
os: darwin x64
Repro steps.
ng build
The log given by the failure.
As a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release,
which will only support Node 6.9 and greater. This package will be officially deprecated
shortly after.
To disable this warning use "ng set --global warnings.packageDeprecation=false".
Version of @angular/compiler-cli needs to be 2.3.1 or greater. Current version is "undefined".
Error: Version of @angular/compiler-cli needs to be 2.3.1 or greater. Current version is "undefined".
at Object. (.../node_modules/@ngtools/webpack/src/index.js:27:11)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
... etc ...
Desired functionality.
Our build tool cannot crash out of the blue, having changed nothing at all in our code or configurations. Running npm install with specific versions listed for every package in the package.json should not crash the build machine, and every machine of every developer unfortunate enough to have run "npm install" locally.
Mention any other details that might be useful.
The text was updated successfully, but these errors were encountered: