reactjs - Error while parsing JSON babel failure -


when run gulp error while parsing json:

syntax error 'c:\path\main.js' error while parsing json at: 98 text: '{\r\n   "development": 

"text" truncated in command line. tried piping output file , failed because error did not showup in file:

powershell cmd

gulp | out-file c:\temp.txt -width 120

package.json

{   "name": "helloreact",   "version": "1.0.0",   "description": "",   "main": "main.js",   "dependencies": {     "babel": "^6.5.1",     "babel-plugin-react-transform": "^2.0.0",     "babel-preset-react": "^6.3.13",     "babelify": "^7.2.0",     "bootstrap": "^3.3.5",     "flux": "^2.0.3",     "gulp": "^3.9.0",     "gulp-concat": "^2.6.0",     "gulp-connect": "^2.2.0",     "gulp-eslint": "^1.1.1",     "gulp-open": "^1.0.0",     "gulp-sourcemaps": "^1.6.0",     "jquery": "^2.1.4",     "jquery-csv": "^0.8.1",     "lodash": "^4.0.1",     "object-assign": "^4.0.1",     "react": "^0.13.3",     "react-router": "^0.13.3",     "react-tools": "^0.10.0",     "react-transform": "0.0.3",     "reactify": "^1.1.1",     "redbox-react": "^1.2.2",     "toastr": "^2.1.0",     "vinyl-source-stream": "^1.1.0"   },   "devdependencies": {},   "scripts": {     "test": "echo \"error: no test specified\" && exit 1"   },   "author": "",   "license": "isc" } 

.babelrc

{   "env": {     "development": {       "plugins": ["react-transform"],       }     }   } } 

my gulp task uses babelify

gulp.task('js', function(){   browserify(config.paths.mainjs,  { debug: true })       .transform(babel, {presets: ["react"]})       .transform(reactify)       .bundle()       .on('error', console.error.bind(console))       .pipe(source('bundle.js'))       .pipe(sourcemaps.init({ loadmaps: true }))       .pipe(sourcemaps.write('./'))//todo: not sure if syntax correct       .pipe(gulp.dest(config.paths.dist + '/scripts'))       .pipe(connect.reload()) }); 

try removing comma in bablerc

{   "env": {     "development": {       "plugins": ["react-transform"]       }     }   } } 

Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -