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.

npm ERR! weird error 2

See original GitHub issue

~/my-proj$ npm start

> angular2-quickstart@1.0.0 start /home/santoshdora/my-proj
> tsc && concurrently "tsc -w" "lite-server" 

app/app.component.ts(1,25): error TS2307: Cannot find module '@angular/core'.
app/app.component.spec.ts(9,8): error TS2307: Cannot find module '@angular/core/testing'.
app/app.component.spec.ts(11,38): error TS2307: Cannot find module '@angular/compiler/testing'.
app/app.component.spec.ts(13,32): error TS2307: Cannot find module '@angular/platform-browser'.
app/app.component.spec.ts(14,32): error TS2307: Cannot find module '@angular/core'.
app/app.component.spec.ts(15,32): error TS2307: Cannot find module '@angular/core'.
app/app.component.spec.ts(16,32): error TS2307: Cannot find module '@angular/core/src/facade/promise'.
app/app.component.spec.ts(38,40): error TS7006: Parameter 'fixture' implicitly has an 'any' type.
app/app.component.spec.ts(46,42): error TS7006: Parameter 'fixture' implicitly has an 'any' type.
app/app.component.spec.ts(49,43): error TS7006: Parameter 'el' implicitly has an 'any' type.
app/main.ts(1,28): error TS2307: Cannot find module '@angular/platform-browser-dynamic'.
npm ERR! weird error 2
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

The above error is showing. How to correct the above issue?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
wardbellcommented, May 29, 2016

Closing because this seems “solved”.

Please, people, do not paste entire console logs in comments. A little bit is sufficient. Thanks.

0reactions
J-Siucommented, May 25, 2016

I am trying to learn Angular 2 and start following quickstart a few days ago. I ran into the exact same issue as stefanstelzer. Using 2.0.0-RC1 instead of master solved the issue.

The line that make the difference is in package.json, “typings”: “^0.8.1” (2.0.0-RC1), instead of “^1.0.4” (master).

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm start showing weird error 1 - node.js - Stack Overflow
Executing sudo apt-get install nodejs-legacy from your command line/shell will resolve the issue. Share.
Read more >
Common errors | npm Docs
Some strange issues can be resolved by simply running npm cache clean and trying again. If you are having trouble with npm install...
Read more >
How to fix: npm ERR! enoent ENOENT: no such file or ...
I recently struggled for a while with an npm error thrown when executing npm install of some package. The error message was npm...
Read more >
"npm start" permission denied error: how to solve it?
"npm start" permission denied error: how to solve it?. Weird, strange or annoying errors are part of our lives as miserable developers we...
Read more >
Getting weird error when doing npm install in my angular project
Remove package-lock.json, Remove node_modules, and then install packages using `npm install'. This resolved issue for me.
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 Reddit Thread

No results found

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