angular-cli: Error code 1 when installing Angular CLI

This is a bug report.

When trying to install Angular CLI, I’m getting the errors listed below.

This did not happen about 3 weeks ago when I first installed it, but it does now.

OS

OSX El Capitan

Versions

Node v5.2.0 NPM 3.3.12

How I found the error

I simply ran npm i -g --save angular-cli. There were errors about lodash being expired (because a half billion modules use an outdated lodash.) and a reference to padleft that you can see at the top of the log below. For all I know that version of lodash used the leftpad module that caused all the ruckus recently. That’s just a guess, but it’s breaking the build.

Error

install:lodash.padlef ▌ ╢███████████
postinstall:lodash._baset ▄ ╢█████████
postinstall:npmlog        ▐ ╢██████████
postinstall:mime-db → lif ▄ ╢█████████
postinstall:validate-npm- ▌ ╢█████████
> broccoli@1.0.0-beta.6 postinstall /usr/local/lib/node_modules/angular-cli/node_modules/broccoli
> multidep test/multidep.json

postinstall:underscore.st ▌ ╢█████████
broccoli-plugin 1.0.0: Installing
module.js:329
    throw err;
    ^

Error: Cannot find module 'config-chain'
    at Function.Module._resolveFilename (module.js:327:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:355:17)
    at require (internal/module.js:13:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/angular-cli/node_modules/npm/lib/config/core.js:2:10)
    at Module._compile (module.js:399:26)
    at Object.Module._extensions..js (module.js:406:10)
    at Module.load (module.js:345:32)
    at Function.Module._load (module.js:302:12)
    at Module.require (module.js:355:17)
Error: npm exited with exit code 1, signal null
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/angular-cli/node_modules/multidep/index.js:90:28)
    at emitTwo (events.js:88:13)
    at ChildProcess.emit (events.js:173:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:201:12)
postinstall:underscore.st ▌ ╢████████████████
npm WARN install:broccoli@1.0.0-beta.6 broccoli@1.0.0-beta.6 postinstall: `multidep test/multidep.json`
npm WARN install:broccoli@1.0.0-beta.6 Exit status 1
postinstall               ▄ ╢█████████████
executeActions → rollback ▄ ╢███████████████████
executeActions → rollback ▌ ╢███████████████████
runTopLevelLifecycles     ▌ ╢███████████████████
/usr/local/lib
└── (empty)

runTopLevelLifecycles     ▌ ╢████████████████
npm ERR! code 1

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 38 (12 by maintainers)

Most upvoted comments

@pinalbhatt @tedpark I encountered the same problem. I found the solution on the official website (EACCES error): https://docs.npmjs.com/getting-started/fixing-npm-permissions

I’m having the same problem…

I’m running that thing in docker and it fails 😦

Here is an extract of my docker file:

`FROM node:latest

USER root

you should not install it as ROOT user

@n1alloc that file must be a remnant for the old instalation (angular-cli is based on ember-cli). You can delete it.

haha… thats what is alfa release… since last couple of days i am trying to make angular-cli and angularfire2 work. But finally decided to configure angularfire2 manually.