Office 365 – SPFx – downgrade your npm

A while back I upgraded npm to version 5 using

[code lang=text]
npm install -g npm@latest
[/code]

or

[code lang=text]
npm install -g npm@5
[/code]

not really realising that SPFx doesn’t support version 5 of npm (yet). I had to downgrade npm.

running npm install -g npm@3 seemed to be to obvious but that didn’t work:
Office 365 - SPFx - downgrade your npm Microsoft Office 365, SPFx or SharePoint Framework npmdowngrade

I tried uninstalling node.js and I tried removing the npm.cmd command mentioned, but all didn’t work.

then I came across the folder C:\Users\myusername\AppData\Roaming with a folder npm and npm-cache

Office 365 - SPFx - downgrade your npm Microsoft Office 365, SPFx or SharePoint Framework npmroaming

I removed these two folders and then reinstalled node.js. and now npm -v returns the correct version:

Office 365 - SPFx - downgrade your npm Microsoft Office 365, SPFx or SharePoint Framework npm3

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 4,912 other subscribers

Recent Posts

Archive

Thank you for visiting SharePains

%d bloggers like this: