petkaantonov / bluebird

:bird: :zap: Bluebird is a full featured promise library with unmatched performance.
http://bluebirdjs.com
MIT License
20.45k stars 2.33k forks source link

NODE CRASHING BUG => SyntaxError: Unexpected token ILLEGAL #877

Closed meticulo3366 closed 8 years ago

meticulo3366 commented 8 years ago

on version 2.10.2 , bluebird library file utils.js has unicode characters that break the node javascript runtime environment. its a pretty serious crashing bug... please see screenshots and console output below

path for file is in the screenshots...

screen shot 2015-11-18 at 3 24 17 pm

screen shot 2015-11-18 at 3 26 47 pm

my package.json is below

{ "name": "bluebird", "description": "Full featured Promises/A+ implementation with exceptionally good performance", "version": "2.10.2", "keywords": [ "promise", "performance", "promises", "promises-a", "promises-aplus", "async", "await", "deferred", "deferreds", "future", "flow control", "dsl", "fluent interface", "parallel", "thread", "concurrency" ], "scripts": { "lint": "node scripts/jshint.js", "test": "node tools/test.js", "istanbul": "istanbul", "prepublish": "node tools/build.js --no-debug --main --zalgo --browser --minify", "generate-browser-core": "node tools/build.js --features=core --no-debug --main --zalgo --browser --minify && mv js/browser/bluebird.js js/browser/bluebird.core.js && mv js/browser/bluebird.min.js js/browser/bluebird.core.min.js" }, "homepage": "https://github.com/petkaantonov/bluebird", "repository": { "type": "git", "url": "git://github.com/petkaantonov/bluebird.git" }, "bugs": { "url": "http://github.com/petkaantonov/bluebird/issues" }, "license": "MIT", "author": { "name": "Petka Antonov", "email": "petka_antonov@hotmail.com", "url": "http://github.com/petkaantonov/" }, "devDependencies": { "acorn": "~0.6.0", "baconjs": "^0.7.43", "bluebird": "^2.9.2", "body-parser": "^1.10.2", "browserify": "^8.1.1", "cli-table": "~0.3.1", "co": "^4.2.0", "cross-spawn": "^0.2.3", "glob": "^4.3.2", "grunt-saucelabs": "~8.4.1", "highland": "^2.3.0", "istanbul": "^0.3.5", "jshint": "^2.6.0", "jshint-stylish": "~0.2.0", "mkdirp": "~0.5.0", "mocha": "~2.1", "open": "~0.0.5", "optimist": "~0.6.1", "rimraf": "~2.2.6", "rx": "^2.3.25", "serve-static": "^1.7.1", "sinon": "~1.7.3", "uglify-js": "~2.4.16", "kefir": "^2.4.1" }, "main": "./js/main/bluebird.js", "browser": "./js/browser/bluebird.js", "files": [ "js/browser", "js/main", "js/zalgo", "zalgo.js" ], "gitHead": "02c0fd252cf7c0c86e6b27bb06422c404829b539", "_id": "bluebird@2.10.2", "_shasum": "024a5517295308857f14f91f1106fc3b555f446b", "_from": "bluebird@>=2.10.1 <3.0.0", "_npmVersion": "2.11.1", "_nodeVersion": "2.3.0", "_npmUser": { "name": "esailija", "email": "petka_antonov@hotmail.com" }, "maintainers": [ { "name": "esailija", "email": "petka_antonov@hotmail.com" } ], "dist": { "shasum": "024a5517295308857f14f91f1106fc3b555f446b", "tarball": "http://registry.npmjs.org/bluebird/-/bluebird-2.10.2.tgz" }, "directories": {}, "_resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.10.2.tgz" }

petkaantonov commented 8 years ago

The actual files don't have any such characters:

npm install bluebird@2.10.2
grep -rn -P "[^\x20-\x7F]" ./node_modules/bluebird/js/main

I suppose they are somehow inserted by your system. The build step won't even allow building if a source file contains non-ascii character.