Hi am getting the following error while trying to precompile my JSX code. I have been using it but something happened and I am unable to install this
npm install babel-preset-es2015 babel-preset-react
It is showing this error message:
npm ERR! Linux 3.13.0-85-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "babel-preset-es2015" "babel-preset-react" npm ERR! node v4.4.5 npm ERR! npm v2.15.5 npm ERR! file /home/name/.npm/babel-plugin-check-es2015-constants/6.8.0/package/package.json npm ERR! code EJSONPARSE
npm ERR! Failed to parse json npm ERR! Unexpected token '\u0000' at 1:1374 npm ERR! e#readme","_id":"[email protected]","_from":"is-finite@>=1.0.0 <2.0.0"} npm ERR!
^ npm ERR! File: /home/name/.npm/babel-plugin-check-es2015-constants/6.8.0/package/package.json npm ERR! Failed to parse package.json data. npm ERR! package.json must be actual JSON, not just JavaScript. npm ERR! npm ERR! This is not a bug in npm. npm ERR! Tell the package author to fix their package.json file. JSON.parsenpm ERR! Please include the following file with any support request: npm ERR! /var/www/html/js/npm-debug.log
How to fix this?
package.jsonis in wrong format. - Jiang YD