numbers / numbers.js

Advanced Mathematics Library for Node.js and JavaScript
Apache License 2.0
1.77k stars 167 forks source link

can't format #124

Closed Dakkers closed 9 years ago

Dakkers commented 9 years ago

npm run format errors. I get the following:

npm ERR! numbers@0.5.0 format: `gulp format`
npm ERR! Exit status 8

@LarryBattle thoughts on what this is due to?

LarryBattle commented 9 years ago

The formatting feature was working until recently. The root problem is that the gulp-jsbeautifier plugin uses an incompatible and untested version of js-beautifer 1.5.2. Changing the version number to 1.5.1 then reinstalling the plugin node modules puts everything back in sync. For a temporary hack, run these bash commands from a *unix terminal at the root of this project.

gulp-format fix

rm -rf ./node_modules/gulp-jsbeautifier
npm install
cd ./node_modules/gulp-jsbeautifier
rm -rf /node_modules/
sed 's/~1.5.1/1.5.1/' package.json > package.json.new
rm package.json
mv package.json.new package.json
npm install
cd ../../

Now when you run npm run format, everything should work.

The best thing is to replace the gulp-jsbeautifier plug-in with a more stable alternative. Especially, since gulp-jsbeautifier is only at version 0.0.2

Dakkers commented 9 years ago

Cool. We should put that in the readme on the next PR.

Dakkers commented 9 years ago

added to readme in #125 . will keep this open though in case it bugs someone.

LarryBattle commented 9 years ago

Ok. This issue is now fixed. https://github.com/tarunc/gulp-jsbeautifier/pull/2 All that's needed is to update the gulp-jsbeautifier version to 0.0.3 and npm install. I'll try to push a pull request if I have time tonight.