Meteor, Node and NPM Tips

Here are some tips for dealing with Meteor, Node, and NPM.

Meteor

Meteor is slow on Windows

If Meteor is taking forever to install or load or run on Windows, then the two most common reasons are as follows:

Your laptop does not satisfy the hardware/software requirements for this class. As noted on the first day of class, our tech stack has hardware and software requirements. If your laptop is underpowered or has an inappropriate version of the Windows OS, then you need to resolve this.

Your anti-virus software is interfering. According to a Meteor developer who uses Windows extensively, you should add /Users/%USERNAME%/AppData/.meteor, node.exe, 7z.exe and choco.exe to the Windows Defender exclusions list. If you are using another AntiVirus software, make sure these programs are excluded from them as well.

Node or NPM

EINTEGRITY and “Stale Package Data” warnings

Occasionally, invoking npm install or meteor npm install will yield warnings like this:

WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== integrity checksum failed when using sha512: wanted sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== but got sha1-ry87iPpvXB5MY00aD46sT1WzleM=. (69241 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.

The normal fix for this is to first clean out the NPM cache:

$ npm cache clean --force

Next, delete your node_modules directory:

$ rm -rf node_modules

And finally, re-run your original command:

$ meteor npm install

Update NPM

If you have an old version of NPM installed, and you are getting warnings to that effect, you might need to update it.

sudo npm install npm -g