Node on Windows--problems
It tends to be a little flaky. After several failures I decided to make a clean install. I removed nodjs using Control Panel. But that's not enough.
Npm keeps two directories around that you need to clean up manually:
C:\Users\<username>\AppData\Roaming\node-cache has stuff that has been downloaded from the repository and not installed. Clearing it fixed some of my problems. And nuking C:\Users\<username>\AppData\Roaming\node_modules cleaned the rest.
When I tried to do a clean install I ran into s a bug in the Windows installer right now that yields an error that looks like this:
npm ERR! Error: spawn ENOTSUP
npm ERR! at errnoException (child_process.js:483:11)
npm ERR! at ChildProcess.spawn (child_process.js:446:11)
npm ERR! at Object.spawn (child_process.js:342:9)
npm ERR! at spawn (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\
exec.js:118:22)
Blah, blah, blah (as described in issue 2405):
The solution is in this commit. You'll need to edit the npm source file found here:
Then make this change:
Unless you are running your editor with administrative privileges you'll have to modify the file's permissions to save the change. I did it with explorer's properties dialog.
I tried to install all my packages locally rather than globally to avoid any cross-contamination, even at the cost of space. That didn't work for brunch, which seems to create a brunch.cmd only when installed globally.
Npm keeps two directories around that you need to clean up manually:
C:\Users\<username>\AppData\Roaming\node-cache has stuff that has been downloaded from the repository and not installed. Clearing it fixed some of my problems. And nuking C:\Users\<username>\AppData\Roaming\node_modules cleaned the rest.
When I tried to do a clean install I ran into s a bug in the Windows installer right now that yields an error that looks like this:
npm ERR! Error: spawn ENOTSUP
npm ERR! at errnoException (child_process.js:483:11)
npm ERR! at ChildProcess.spawn (child_process.js:446:11)
npm ERR! at Object.spawn (child_process.js:342:9)
npm ERR! at spawn (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\
exec.js:118:22)
Blah, blah, blah (as described in issue 2405):
The solution is in this commit. You'll need to edit the npm source file found here:
C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils
Then make this change:
| ||
106 | 105 |
|
107 | 106 |
|
108 | 107 | |
109 |
| |
110 |
| |
108 |
| |
109 |
|
Unless you are running your editor with administrative privileges you'll have to modify the file's permissions to save the change. I did it with explorer's properties dialog.
I tried to install all my packages locally rather than globally to avoid any cross-contamination, even at the cost of space. That didn't work for brunch, which seems to create a brunch.cmd only when installed globally.
Comments
Post a Comment