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

Locally installed CLI beta.31 is not initializing the project ('ng init' failed) #4761

Closed
kuncevic opened this issue Feb 16, 2017 · 6 comments

Comments

@kuncevic
Copy link

kuncevic commented Feb 16, 2017

As per this pull request 761e86f CLI should be able to run without global install.
There was no issues with that until beta.31

OS?

Windows 7

Versions.

My project local CLI, npm run ng -- -v:

@angular/cli: 1.0.0-beta.31
node: 6.9.2
os: win32 x64
@angular/cli: 1.0.0-beta.31

Repro steps.

  • npm init -y
  • alter package.json by adding "ng":"ng" in to scripts (761e86f).
  • install @angular/cli --save
  • npm run ng -- init

The log given by the failure.

c:\Projects\my-app>npm run ng -- init

> [email protected] ng c:\Projects\my-app
> ng "init"

installing ng2
? Overwrite package.json? Yes, overwrite

c:\Projects\my-app>

Expected

installing ng2
? Overwrite package.json? Yes, overwrite
  create .editorconfig
  create README.md
  create src\app\app.component.css
  create src\app\app.component.html
  create src\app\app.component.spec.ts
  create src\app\app.component.ts
  create src\app\app.module.ts
  create src\environments\environment.prod.ts
  create src\environments\environment.ts
  create src\index.html
  create src\main.ts
  create src\polyfills.ts
  create src\styles.css
  create src\test.ts
  create src\tsconfig.json
  create angular-cli.json
  create e2e\app.e2e-spec.ts
  create e2e\app.po.ts
  create e2e\tsconfig.json
  create .gitignore
  create karma.conf.js
  overwrite package.json
  create protractor.conf.js
  create tslint.json
Successfully initialized git.
Installing packages for tooling via npm.

Mention any other details that might be useful.

Working with locally installed beta.30 and below.

p.s:
Also I tried to run npm run ng -- update as per this PR 2211172 but having exactly same thing happening.

@kuncevic kuncevic changed the title CLI not initializing the project without install ('ng init' failed) Locally installed CLI beta.31 is not initializing the project ('ng init' failed) Feb 16, 2017
@Meligy
Copy link
Contributor

Meligy commented Feb 17, 2017

Duplicate of #4653 / #4584.

@kuncevic
Copy link
Author

kuncevic commented Feb 17, 2017

@Meligy Yeah i c, in my case I am initializing just fresh project having package.json like that:

{
  "name": "my-app",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "ng": "ng"
  },
}

having just single file in my project folder which is package.json.
If it is makes any difference

@Meligy
Copy link
Contributor

Meligy commented Feb 17, 2017

I'm afraid it doesn't matter. The command was broken in beta.31, and now it's removed in master. It won't be there in v1.0 final, and will not exist again until it's rewritten for v2.0.

@kuncevic
Copy link
Author

kuncevic commented Feb 17, 2017

So i c PR #4628 that removing init and update.
But how would you initialize a new CLI app without having CLI globally installed? It is seams to be impossible now.

@Meligy
Copy link
Contributor

Meligy commented Feb 17, 2017

At the moment you'll have to download the CLI to another folder different from the new project folder and use it.

At least until something happens with #4762 and it gets opened / superseded with something.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
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

2 participants