Chaklader
Chaklader

Reputation: 169

Getting error while creating new Angular 2 project

I install AngularJs using the command npm install -g angular-cli and afterwards, when I was trying to create new project, I get the following error,

Cannot find module 'reflect-metadata'

What should I for resolve the error ?

Upvotes: 1

Views: 371

Answers (3)

user261588
user261588

Reputation: 3

Re-installing node.js worked for me.

Upvotes: 0

Chaklader
Chaklader

Reputation: 169

I had to reintall nodeJS from their website and install reflect-metadata and portfinder using the following commands while being as superuser,

sudo npm install -g reflect-metadata
sudo npm install -g portfinder

Afterwards, I can create new project using the command,

ng new myProject

Upvotes: 1

Sajan
Sajan

Reputation: 1923

Upgrade npm by npm install -g npm. If problem still exists try:

npm i -g reflect-metadata

Upvotes: 0

Related Questions