Ionic-cli: TypeError: argument entity must be string, Buffer, or fs.Stats

Created on 29 Sep 2015  ·  6Comments  ·  Source: ionic-team/ionic-cli

I am getting this error when I try to run ionic:

/usr/local/lib/node_modules/ionic/node_modules/serve-static/node_modules/send/node_modules/etag/index.js:55
throw new TypeError('argument entity must be string, Buffer, or fs.Stats')
^
TypeError: argument entity must be string, Buffer, or fs.Stats
at etag (/usr/local/lib/node_modules/ionic/node_modules/serve-static/node_modules/send/node_modules/etag/index.js:55:11)
at SendStream.setHeader (/usr/local/lib/node_modules/ionic/node_modules/serve-static/node_modules/send/index.js:724:15)
at SendStream.send (/usr/local/lib/node_modules/ionic/node_modules/serve-static/node_modules/send/index.js:500:8)
at onstat (/usr/local/lib/node_modules/ionic/node_modules/serve-static/node_modules/send/index.js:585:10)
at FSReqWrap.oncomplete (fs.js:95:15)

My node version is v4.1.1

Anyone come across this recently and know a fix?

Most helpful comment

Same error, haven't found anything on the web so I updated manually the etag package:

cd /usr/local/lib/node_modules/ionic/node_modules/serve-static/node_modules/send/
npm install [email protected]

All 6 comments

Same error, haven't found anything on the web so I updated manually the etag package:

cd /usr/local/lib/node_modules/ionic/node_modules/serve-static/node_modules/send/
npm install [email protected]

Nice, @AbdelBa! I've searching for like 2 hours for how to fix this.

Thanks for opening the issue. It seems that issue has been resolved. I am going to close this issue but please feel free to reopen another issue if this occurs again.

Still Issue exist. I am getting the following error

throw new TypeError('argument entity must be string, Buffer, or fs.Stats')
^

TypeError: argument entity must be string, Buffer, or fs.Stats
at etag (C:\Users\ABC\AppData\Roaming\npm\node_modules\ionic\node_modulesetag\index.js:55:11)
at SendStream.setHeader (C:\Users\ABC\AppData\Roaming\npm\node_modules\ionic\node_modules\send\index.js:724:15)
at SendStream.send (C:\Users\ABC\AppData\Roaming\npm\node_modules\ionic\node_modules\send\index.js:500:8)
at onstat (C:\Users\ABC\AppData\Roaming\npm\node_modules\ionic\node_modules\send\index.js:585:10)
at FSReqWrap.oncomplete (fs.js:82:15)

This worked for me:

cd /usr/local/lib/node_modules/ionic/node_modules/send

neptune:send chris$ sudo npm install [email protected]

it says invalid, but ionic serve will now work.

The solution @chris087 provided worked for me.

In Windows environment just change the location to:

C:\Users{your user folder}\AppData\Roaming\nvm\v6.10.3{might need to change this as well}\node_modules\ionic\node_modules\send

Then run npm install [email protected]

Was this page helpful?
0 / 5 - 0 ratings