As I used Win8, 2503 and 2502 errors occurred when installing nodejs. Solution:
Enter cmd and enter msiexec/package [path: Location of the node to be installed]
The operation is shown in:
After the previous step, you can install the node normally. To determine whether the installation is successful, you can press Ctrl + R and enter node-v.
The new node version already contains NPM, so no additional installation is required. Enter NPM-V to view the NPM version.
After installing node, you can install grunt. [Refer to the steps on the Chinese official website: http://www.gruntjs.org /]
Step 1: Enter NPM install-G grunt-cli
Step 2: NPM install grunt -- save-Dev
Step 3: Configure environment variables. Copy the bin path under grunt to path and click OK.
Return to the command line and enter grunt-version to view your grunt version number. It also indicates that you have successfully installed grunt.
Install node and grunt