question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error code 1 when installing Angular CLI

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:38 (12 by maintainers)

github_iconTop GitHub Comments

52reactions
anode7commented, Mar 25, 2016

@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

3reactions
anode7commented, Apr 5, 2016

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error code 1 when installing Angular CLI #345 - GitHub
Guys, I uninstalled angular-cli as I had originally installed it globally with sudo. Then, I made sure that the owner permissions were reset...
Read more >
How to solve npm install error β€œnpm ERR! code 1”
If your Node.js version is very recent, try downgrading. The stable version 14.16.1 worked.
Read more >
CLI Overview and Command Reference - Angular
The Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications directly from a commandΒ ......
Read more >
How to solve npm ERR! code 1 when running npm install
Fix npm error code 1 by updating your dependencies Β· Update one package version in package.json file Β· Then run npm install Β·...
Read more >
ng: command not found (Angular) error [Solved] | bobbyhadz
To solve the error "ng: command not found", install the angular cli package globally by running npm install -g @angular/cli@latest and restart your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found