npm install formidable does not work in node 0.10

I am doing the tutorials in The Node Beginner Book and I cannot install formidable because of a version error. Here's the error. I seem to get this error with or without using sudo and @latest.

npm install formidable@latest
npm http GET https://registry.npmjs.org/formidable
npm http 304 https://registry.npmjs.org/formidable
npm WARN engine formidable@1.0.13: wanted: {"node":"<0.9.0"} (current: {"node":"v0.10.0","npm":"1.2.14"})

The error means exactly what's stated, the module is expecting a Node version before 0.9.0 and your current version is 0.10.0.

wanted: {"node":"<0.9.0"}
current: {"node":"v0.10.0","npm":"1.2.14"}

An easy solution to this would be using an older version of Node, which you can easily get from the Node repository.

You can also use n, which allows you to easily switch between or install multiple node binaries.

npm install -g n
n 0.8.9
//installs node version 0.8.9

If you won't need the binary later, you can remove it easily.

n rm 0.8.9

try a fork of formidable that supposedly supported 0.10.x:

https://github.com/superjoe30/node-multiparty

Go to the readme.md in github and it will show the npm install command as well as the git clone command which should work if npm install fails.

git clone git://github.com/felixge/node-formidable.git formidable

I had the same exact problem with my node v0.10.25 after running the below code.

> npm install formidable@latest

npm http GET https://registry.npmjs.org/formidable
npm http 304 https://registry.npmjs.org/formidable

I change the instruction to

> npm install formidable@1.0.2

It's now working perfectly fine. I suppose the latest version is incompatible.