Skip to content

Error after installation #1045

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

Closed
nanomoffet opened this issue Jun 9, 2016 · 5 comments
Closed

Error after installation #1045

nanomoffet opened this issue Jun 9, 2016 · 5 comments

Comments

@nanomoffet
Copy link

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Mac OS X Yosemite

  1. Versions. Please run ng --version. If there's nothing outputted, please
    run in a Terminal:
    node --version
    And paste the result here.

node --version
v5.11.1

  1. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.

Fresh install of Node via NVM. Ran npm install -g angular-cli, completes without issue (just lodash warnings, no errors).

Unable to run ng --version, ng --help, or any other command without generating the below error.

  1. The log given by the failure. Normally this include a stack trace and some
    more information.
/Users/josephpowers/.nvm/versions/node/v5.11.1/lib/node_modules/angular-cli/node_modules/ember-cli/lib/models/project.js:669
      throw reason;
      ^

SyntaxError: /Users/josephpowers/package.json: Unexpected end of input
    at Object.parse (native)
    at Object.Module._extensions..json (module.js:430:27)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Function.Project.getProjectRoot (/Users/josephpowers/.nvm/versions/node/v5.11.1/lib/node_modules/angular-cli/node_modules/ember-cli/lib/models/project.js:655:15)
    at module.exports (/Users/josephpowers/.nvm/versions/node/v5.11.1/lib/node_modules/angular-cli/node_modules/ember-cli/lib/cli/index.js:51:22)
    at module.exports (/Users/josephpowers/.nvm/versions/node/v5.11.1/lib/node_modules/angular-cli/lib/cli/index.js:102:10)
    at /Users/josephpowers/.nvm/versions/node/v5.11.1/lib/node_modules/angular-cli/bin/ng:31:5
  1. Mention any other details that might be useful.

    Thanks! We'll be in touch soon.

@nanomoffet nanomoffet changed the title Error upon installation Error after installation Jun 9, 2016
@nanomoffet
Copy link
Author

Somehow an empty package.json was initialized in the home directory which was conflicting with it. Once I deleted that file, it started working fine.

@bmcswee
Copy link

bmcswee commented Jun 15, 2016

I had the same issue today on Linux (immediately after a new global install). The empty package.json wasn't in my home dir though, it was in the parent of the dir I was in when I issued the install command.

I also solved the problem by removing this file.

@edm00se
Copy link

edm00se commented Jun 18, 2016

I had the same, with a package.json being created in my home dir, on Mac OS X El Capitan (10.11.5) (#1133).

@ghost
Copy link

ghost commented Mar 7, 2017

I had a similar issue on Windows 10 using npm 3.10.10...
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules@angular\cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}

I did 2 things that were stated in the discussion: firstly I created the package.json and then I added the "optionalDependencies": {"fsevents: "*" }. Both of these were suggested by posts in this discussion but I can't get back to the top portion of the blog (??). So I can't get the names of the contributors.

Now it seems to work without down grading.

Thanks

@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

3 participants