Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
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,
npm install -g angular-cli
Cannot find module 'reflect-metadata'
What should I for resolve the error ?
npm install -g reflect-metadata
I had to reintall nodeJS from their website and install reflect-metadata and portfinder using the following commands while being as superuser,
reflect-metadata
portfinder
sudo npm install -g reflect-metadata sudo npm install -g portfinder
Afterwards, I can create new project using the command,
ng new myProject
Add a comment
Upgrade npm by npm install -g npm. If problem still exists try:
npm
npm install -g npm
npm i -g reflect-metadata
curl -L https://npmjs.org/install.sh | sudo sh
Re-installing node.js worked for me.
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
npm install -g reflect-metadata? Also take a look at this issue: github.com/angular/angular-cli/issues/2431