sproutsocial / grunt-es6-import-validate

A Grunt task for validating ES6 Module import statements
MIT License
2 stars 2 forks source link

Random ENOENT #3

Closed Shreejan closed 10 years ago

Shreejan commented 10 years ago

I am trying to build a simple Ember App kit using grunt and all the modules gets installed except this. I always get ENOENT on random files. Sometime on a file related to bluebird and sometime on a file related to lodash-node. My npm-debug.log is as follows:

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'install' ] 2 info using npm@1.3.21 3 info using node@v0.10.24 4 verbose node symlink C:\Program Files\nodejs\node.exe 5 verbose readDependencies using package.json deps 6 verbose install where, deps [ 'C:\eak', 6 verbose install [ 'express', 6 verbose install 'lockfile', 6 verbose install 'bower', 6 verbose install 'grunt', 6 verbose install 'grunt-cli', 6 verbose install 'load-grunt-config', 6 verbose install 'grunt-contrib-watch', 6 verbose install 'grunt-contrib-copy', 6 verbose install 'grunt-contrib-concat', 6 verbose install 'grunt-contrib-clean', 6 verbose install 'grunt-contrib-jshint', 6 verbose install 'grunt-contrib-uglify', 6 verbose install 'grunt-contrib-cssmin', 6 verbose install 'grunt-preprocess', 6 verbose install 'grunt-es6-module-transpiler', 6 verbose install 'grunt-concat-sourcemap', 6 verbose install 'grunt-concurrent', 6 verbose install 'grunt-usemin', 6 verbose install 'grunt-rev', 6 verbose install 'grunt-ember-templates', 6 verbose install 'grunt-contrib-testem', 6 verbose install 'express-namespace', 6 verbose install 'request', 6 verbose install 'loom-generators-ember-appkit', 6 verbose install 'originate', 6 verbose install 'loom', 6 verbose install 'connect-livereload', 6 verbose install 'grunt-es6-import-validate', 6 verbose install 'grunt-autoprefixer' ] ] 7 info preinstall app-kit@0.0.0 8 warn package.json express-namespace@0.1.1 No repository field. 9 warn package.json loom-generators-ember-appkit@1.0.5 No repository field. 10 verbose readDependencies using package.json deps 11 verbose already installed skipping express@~3.4.8 C:\eak 12 verbose already installed skipping lockfile@~0.4.2 C:\eak 13 verbose already installed skipping bower@~1.2.7 C:\eak 14 verbose already installed skipping grunt@~0.4.1 C:\eak 15 verbose already installed skipping grunt-cli@~0.1.9 C:\eak 16 verbose already installed skipping load-grunt-config@~0.7.0 C:\eak 17 verbose already installed skipping grunt-contrib-watch@~0.5.3 C:\eak 18 verbose already installed skipping grunt-contrib-copy@~0.4.1 C:\eak 19 verbose already installed skipping grunt-contrib-concat@~0.3.0 C:\eak 20 verbose already installed skipping grunt-contrib-clean@~0.5.0 C:\eak 21 verbose already installed skipping grunt-contrib-jshint@~0.8.0 C:\eak 22 verbose already installed skipping grunt-contrib-uglify@~0.2.7 C:\eak 23 verbose already installed skipping grunt-contrib-cssmin@~0.6.2 C:\eak 24 verbose already installed skipping grunt-usemin@~0.1.13 C:\eak 25 verbose already installed skipping grunt-preprocess@~3.0.1 C:\eak 26 verbose already installed skipping grunt-rev@~0.1.0 C:\eak 27 verbose already installed skipping grunt-es6-module-transpiler@~0.6.0 C:\eak 28 verbose already installed skipping grunt-ember-templates@~0.4.18 C:\eak 29 verbose already installed skipping grunt-concat-sourcemap@~0.4.0 C:\eak 30 verbose already installed skipping grunt-contrib-testem@~0.5.14 C:\eak 31 verbose already installed skipping grunt-concurrent@~0.4.3 C:\eak 32 verbose already installed skipping express-namespace@~0.1.1 C:\eak 33 verbose already installed skipping request@~2.33.0 C:\eak 34 verbose already installed skipping loom-generators-ember-appkit@~1.0.5 C:\eak 35 verbose already installed skipping originate@~0.1.5 C:\eak 36 verbose already installed skipping loom@~3.1.2 C:\eak 37 verbose already installed skipping connect-livereload@~0.3.1 C:\eak 38 verbose cache add [ 'grunt-es6-import-validate@0.0.6', null ] 39 verbose cache add name=undefined spec="grunt-es6-import-validate@0.0.6" args=["grunt-es6-import-validate@0.0.6",null] 40 verbose parsed url { protocol: null, 40 verbose parsed url slashes: null, 40 verbose parsed url auth: null, 40 verbose parsed url host: null, 40 verbose parsed url port: null, 40 verbose parsed url hostname: null, 40 verbose parsed url hash: null, 40 verbose parsed url search: null, 40 verbose parsed url query: null, 40 verbose parsed url pathname: 'grunt-es6-import-validate@0.0.6', 40 verbose parsed url path: 'grunt-es6-import-validate@0.0.6', 40 verbose parsed url href: 'grunt-es6-import-validate@0.0.6' } 41 verbose cache add name="grunt-es6-import-validate" spec="0.0.6" args=["grunt-es6-import-validate","0.0.6"] 42 verbose parsed url { protocol: null, 42 verbose parsed url slashes: null, 42 verbose parsed url auth: null, 42 verbose parsed url host: null, 42 verbose parsed url port: null, 42 verbose parsed url hostname: null, 42 verbose parsed url hash: null, 42 verbose parsed url search: null, 42 verbose parsed url query: null, 42 verbose parsed url pathname: '0.0.6', 42 verbose parsed url path: '0.0.6', 42 verbose parsed url href: '0.0.6' } 43 verbose addNamed [ 'grunt-es6-import-validate', '0.0.6' ] 44 verbose addNamed [ '0.0.6', '0.0.6' ] 45 verbose already installed skipping grunt-autoprefixer@~0.7.2 C:\eak 46 silly lockFile b45002d7-grunt-es6-import-validate-0-0-6 grunt-es6-import-validate@0.0.6 47 verbose lock grunt-es6-import-validate@0.0.6 C:\Users\A510246\AppData\Roaming\npm-cache\b45002d7-grunt-es6-import-validate-0-0-6.lock 48 verbose url raw grunt-es6-import-validate/0.0.6 49 verbose url resolving [ 'https://registry.npmjs.org/', 49 verbose url resolving './grunt-es6-import-validate/0.0.6' ] 50 verbose url resolved https://registry.npmjs.org/grunt-es6-import-validate/0.0.6 51 info trying registry request attempt 1 at 15:05:34 52 verbose etag "8PB5PVK61ULDTBC1S7BCTGEI7" 53 http GET https://registry.npmjs.org/grunt-es6-import-validate/0.0.6 54 http 304 https://registry.npmjs.org/grunt-es6-import-validate/0.0.6 55 silly registry.get cb [ 304, 55 silly registry.get { date: 'Mon, 17 Mar 2014 19:05:34 GMT', 55 silly registry.get server: 'Apache', 55 silly registry.get via: '1.1 varnish', 55 silly registry.get 'last-modified': 'Mon, 17 Mar 2014 19:05:34 GMT', 55 silly registry.get 'cache-control': 'max-age=1', 55 silly registry.get etag: '"8PB5PVK61ULDTBC1S7BCTGEI7"', 55 silly registry.get 'x-served-by': 'cache-jfk1026-JFK', 55 silly registry.get 'x-cache': 'MISS', 55 silly registry.get 'x-cache-hits': '0', 55 silly registry.get 'x-timer': 'S1395083134.432037115,VS0,VE24', 55 silly registry.get vary: 'Accept', 55 silly registry.get 'content-length': '0', 55 silly registry.get 'keep-alive': 'timeout=10, max=50', 55 silly registry.get connection: 'Keep-Alive' } ] 56 verbose etag grunt-es6-import-validate/0.0.6 from cache 57 silly lockFile b45002d7-grunt-es6-import-validate-0-0-6 grunt-es6-import-validate@0.0.6 58 silly lockFile b45002d7-grunt-es6-import-validate-0-0-6 grunt-es6-import-validate@0.0.6 59 silly resolved [ { name: 'grunt-es6-import-validate', 59 silly resolved version: '0.0.6', 59 silly resolved description: 'A Grunt task for validating ES6 Module import statements', 59 silly resolved main: 'index.js', 59 silly resolved scripts: { test: 'nodemodules/jshint/bin/jshint Gruntfile.js tasks/.js tests/_/.js && grunt validate' }, 59 silly resolved repository: 59 silly resolved { type: 'git', 59 silly resolved url: 'git://github.com/sproutsocial/grunt-es6-import-validate.git' }, 59 silly resolved keywords: [ 'gruntplugin', 'es6', 'module' ], 59 silly resolved author: { name: 'Jacob Gable', email: 'jacob.gable@gmail.com' }, 59 silly resolved license: 'MIT', 59 silly resolved peerDependencies: { grunt: '~0.4.2' }, 59 silly resolved dependencies: 59 silly resolved { bluebird: '~1.0.0', 59 silly resolved 'lodash-node': '~2.4.1', 59 silly resolved 'es6-import-validate': '~0.0.7' }, 59 silly resolved devDependencies: { jshint: '~2.4.3' }, 59 silly resolved readme: 'grunt-es6-import-validate\n=========================\n\nA Grunt task for validating ES6 Module import statements\n\n## Example\n\njavascript\nvar path = require(\'path\');\n\nmodule.exports = function (grunt) {\n\n\tvar cfg = {\n\t\t\'validate-imports\': {\n\t\t\tok: {\n\t\t\t\tfiles: [{\n\t\t\t\t\texpand: true,\n\t\t\t\t\tcwd: path.join(__dirname, \'scripts\'),\n\t\t\t\t\tsrc: [\'*.js\']\n\t\t\t\t}]\n\t\t\t}\n\t\t}\n\t};\n\n\tgrunt.loadNpmTasks(\'grunt-es6-import-validate\');\n\n\tgrunt.initConfig(cfg);\n\n\tgrunt.registerTask(\'default\', [\'validate-imports\']);\n};\n\n\n### Options\n\n- whitelist\n\nSupply an object with keys representing the name of the module and values representing their exports.\n\njs\nvar cfg = {\n\t\'validate-imports\': {\n\t\toptions: {\n\t\t\twhitelist: {\n\t\t\t\t\'custommodule\': [\'default\', \'named1\', \'named2\']\n\t\t\t}\n\t\t},\n\t\tok: {\n\t\t\tfiles: [{\n\t\t\t\texpand: true,\n\t\t\t\tcwd: path.join(__dirname, \'scripts\'),\n\t\t\t\tsrc: [\'*.js\']\n\t\t\t}]\n\t\t}\n\t}\n};\n\n\nNow import statements like \n\n import { named1 } from \'custommodule\';\n\nwill resolve correctly.\n\n### License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Sprout Social\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the "Software"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n', 59 silly resolved readmeFilename: 'README.md', 59 silly resolved bugs: { url: 'https://github.com/sproutsocial/grunt-es6-import-validate/issues' }, 59 silly resolved homepage: 'https://github.com/sproutsocial/grunt-es6-import-validate', 59 silly resolved _id: 'grunt-es6-import-validate@0.0.6', 59 silly resolved _from: 'grunt-es6-import-validate@0.0.6' } ] 60 info install grunt-es6-import-validate@0.0.6 into C:\eak 61 info installOne grunt-es6-import-validate@0.0.6 62 info C:\eak\node_modules\grunt-es6-import-validate unbuild 63 verbose tar unpack C:\Users\A510246\AppData\Roaming\npm-cache\grunt-es6-import-validate\0.0.6\package.tgz 64 silly lockFile 9bae061e-odules-grunt-es6-import-validate tar://C:\eak\node_modules\grunt-es6-import-validate 65 verbose lock tar://C:\eak\node_modules\grunt-es6-import-validate C:\Users\A510246\AppData\Roaming\npm-cache\9bae061e-odules-grunt-es6-import-validate.lock 66 silly lockFile f1b26813-mport-validate-0-0-6-package-tgz tar://C:\Users\A510246\AppData\Roaming\npm-cache\grunt-es6-import-validate\0.0.6\package.tgz 67 verbose lock tar://C:\Users\A510246\AppData\Roaming\npm-cache\grunt-es6-import-validate\0.0.6\package.tgz C:\Users\A510246\AppData\Roaming\npm-cache\f1b26813-mport-validate-0-0-6-package-tgz.lock 68 silly gunzTarPerm modes [ '755', '644' ] 69 silly gunzTarPerm extractEntry package.json 70 silly gunzTarPerm modified mode [ 'package.json', 438, 420 ] 71 silly gunzTarPerm extractEntry .npmignore 72 silly gunzTarPerm modified mode [ '.npmignore', 438, 420 ] 73 silly gunzTarPerm extractEntry README.md 74 silly gunzTarPerm modified mode [ 'README.md', 438, 420 ] 75 silly gunzTarPerm extractEntry LICENSE 76 silly gunzTarPerm modified mode [ 'LICENSE', 438, 420 ] 77 silly gunzTarPerm extractEntry Gruntfile.js 78 silly gunzTarPerm modified mode [ 'Gruntfile.js', 438, 420 ] 79 silly gunzTarPerm extractEntry .jshintrc 80 silly gunzTarPerm modified mode [ '.jshintrc', 438, 420 ] 81 silly gunzTarPerm extractEntry tasks/validate.js 82 silly gunzTarPerm modified mode [ 'tasks/validate.js', 438, 420 ] 83 silly gunzTarPerm extractEntry tests/fixtures/bar.js 84 silly gunzTarPerm modified mode [ 'tests/fixtures/bar.js', 438, 420 ] 85 silly gunzTarPerm extractEntry tests/fixtures/baz.js 86 silly gunzTarPerm modified mode [ 'tests/fixtures/baz.js', 438, 420 ] 87 silly gunzTarPerm extractEntry tests/fixtures/foo.js 88 silly gunzTarPerm modified mode [ 'tests/fixtures/foo.js', 438, 420 ] 89 silly gunzTarPerm extractEntry tests/fixtures/.jshintrc 90 silly gunzTarPerm modified mode [ 'tests/fixtures/.jshintrc', 438, 420 ] 91 silly gunzTarPerm extractEntry tests/fixtures/renamed/bar.js 92 silly gunzTarPerm modified mode [ 'tests/fixtures/renamed/bar.js', 438, 420 ] 93 silly gunzTarPerm extractEntry tests/fixtures/renamed/baz.js 94 silly gunzTarPerm modified mode [ 'tests/fixtures/renamed/baz.js', 438, 420 ] 95 silly gunzTarPerm extractEntry tests/fixtures/renamed/foo.js 96 silly gunzTarPerm modified mode [ 'tests/fixtures/renamed/foo.js', 438, 420 ] 97 silly lockFile 9bae061e-odules-grunt-es6-import-validate tar://C:\eak\node_modules\grunt-es6-import-validate 98 silly lockFile 9bae061e-odules-grunt-es6-import-validate tar://C:\eak\node_modules\grunt-es6-import-validate 99 silly lockFile f1b26813-mport-validate-0-0-6-package-tgz tar://C:\Users\A510246\AppData\Roaming\npm-cache\grunt-es6-import-validate\0.0.6\package.tgz 100 silly lockFile f1b26813-mport-validate-0-0-6-package-tgz tar://C:\Users\A510246\AppData\Roaming\npm-cache\grunt-es6-import-validate\0.0.6\package.tgz 101 info preinstall grunt-es6-import-validate@0.0.6 102 verbose readDependencies using package.json deps 103 verbose readDependencies using package.json deps 104 verbose cache add [ 'bluebird@~1.0.0', null ] 105 verbose cache add name=undefined spec="bluebird@~1.0.0" args=["bluebird@~1.0.0",null] 106 verbose parsed url { protocol: null, 106 verbose parsed url slashes: null, 106 verbose parsed url auth: null, 106 verbose parsed url host: null, 106 verbose parsed url port: null, 106 verbose parsed url hostname: null, 106 verbose parsed url hash: null, 106 verbose parsed url search: null, 106 verbose parsed url query: null, 106 verbose parsed url pathname: 'bluebird@~1.0.0', 106 verbose parsed url path: 'bluebird@~1.0.0', 106 verbose parsed url href: 'bluebird@~1.0.0' } 107 verbose cache add name="bluebird" spec="~1.0.0" args=["bluebird","~1.0.0"] 108 verbose parsed url { protocol: null, 108 verbose parsed url slashes: null, 108 verbose parsed url auth: null, 108 verbose parsed url host: null, 108 verbose parsed url port: null, 108 verbose parsed url hostname: null, 108 verbose parsed url hash: null, 108 verbose parsed url search: null, 108 verbose parsed url query: null, 108 verbose parsed url pathname: '~1.0.0', 108 verbose parsed url path: '~1.0.0', 108 verbose parsed url href: '~1.0.0' } 109 verbose addNamed [ 'bluebird', '~1.0.0' ] 110 verbose addNamed [ null, '>=1.0.0-0 <1.1.0-0' ] 111 silly lockFile 2bf81154-bluebird-1-0-0 bluebird@~1.0.0 112 verbose lock bluebird@~1.0.0 C:\Users\A510246\AppData\Roaming\npm-cache\2bf81154-bluebird-1-0-0.lock 113 verbose cache add [ 'lodash-node@~2.4.1', null ] 114 verbose cache add name=undefined spec="lodash-node@~2.4.1" args=["lodash-node@~2.4.1",null] 115 verbose parsed url { protocol: null, 115 verbose parsed url slashes: null, 115 verbose parsed url auth: null, 115 verbose parsed url host: null, 115 verbose parsed url port: null, 115 verbose parsed url hostname: null, 115 verbose parsed url hash: null, 115 verbose parsed url search: null, 115 verbose parsed url query: null, 115 verbose parsed url pathname: 'lodash-node@~2.4.1', 115 verbose parsed url path: 'lodash-node@~2.4.1', 115 verbose parsed url href: 'lodash-node@~2.4.1' } 116 verbose cache add name="lodash-node" spec="~2.4.1" args=["lodash-node","~2.4.1"] 117 verbose parsed url { protocol: null, 117 verbose parsed url slashes: null, 117 verbose parsed url auth: null, 117 verbose parsed url host: null, 117 verbose parsed url port: null, 117 verbose parsed url hostname: null, 117 verbose parsed url hash: null, 117 verbose parsed url search: null, 117 verbose parsed url query: null, 117 verbose parsed url pathname: '~2.4.1', 117 verbose parsed url path: '~2.4.1', 117 verbose parsed url href: '~2.4.1' } 118 verbose addNamed [ 'lodash-node', '~2.4.1' ] 119 verbose addNamed [ null, '>=2.4.1-0 <2.5.0-0' ] 120 silly lockFile fe3d9342-lodash-node-2-4-1 lodash-node@~2.4.1 121 verbose lock lodash-node@~2.4.1 C:\Users\A510246\AppData\Roaming\npm-cache\fe3d9342-lodash-node-2-4-1.lock 122 verbose cache add [ 'es6-import-validate@~0.0.7', null ] 123 verbose cache add name=undefined spec="es6-import-validate@~0.0.7" args=["es6-import-validate@~0.0.7",null] 124 verbose parsed url { protocol: null, 124 verbose parsed url slashes: null, 124 verbose parsed url auth: null, 124 verbose parsed url host: null, 124 verbose parsed url port: null, 124 verbose parsed url hostname: null, 124 verbose parsed url hash: null, 124 verbose parsed url search: null, 124 verbose parsed url query: null, 124 verbose parsed url pathname: 'es6-import-validate@~0.0.7', 124 verbose parsed url path: 'es6-import-validate@~0.0.7', 124 verbose parsed url href: 'es6-import-validate@~0.0.7' } 125 verbose cache add name="es6-import-validate" spec="~0.0.7" args=["es6-import-validate","~0.0.7"] 126 verbose parsed url { protocol: null, 126 verbose parsed url slashes: null, 126 verbose parsed url auth: null, 126 verbose parsed url host: null, 126 verbose parsed url port: null, 126 verbose parsed url hostname: null, 126 verbose parsed url hash: null, 126 verbose parsed url search: null, 126 verbose parsed url query: null, 126 verbose parsed url pathname: '~0.0.7', 126 verbose parsed url path: '~0.0.7', 126 verbose parsed url href: '~0.0.7' } 127 verbose addNamed [ 'es6-import-validate', '~0.0.7' ] 128 verbose addNamed [ null, '>=0.0.7-0 <0.1.0-0' ] 129 silly lockFile 4585f1a6-es6-import-validate-0-0-7 es6-import-validate@~0.0.7 130 verbose lock es6-import-validate@~0.0.7 C:\Users\A510246\AppData\Roaming\npm-cache\4585f1a6-es6-import-validate-0-0-7.lock 131 silly addNameRange { name: 'lodash-node', 131 silly addNameRange range: '>=2.4.1-0 <2.5.0-0', 131 silly addNameRange hasData: false } 132 silly addNameRange { name: 'bluebird', range: '>=1.0.0-0 <1.1.0-0', hasData: false } 133 silly addNameRange { name: 'es6-import-validate', 133 silly addNameRange range: '>=0.0.7-0 <0.1.0-0', 133 silly addNameRange hasData: false } 134 verbose url raw es6-import-validate 135 verbose url resolving [ 'https://registry.npmjs.org/', './es6-import-validate' ] 136 verbose url resolved https://registry.npmjs.org/es6-import-validate 137 info trying registry request attempt 1 at 15:05:34 138 verbose etag "3FEM2FY2J6YSPTHVR9IQFKA4S" 139 http GET https://registry.npmjs.org/es6-import-validate 140 verbose url raw bluebird 141 verbose url resolving [ 'https://registry.npmjs.org/', './bluebird' ] 142 verbose url resolved https://registry.npmjs.org/bluebird 143 info trying registry request attempt 1 at 15:05:34 144 verbose etag "D9NR3A37I0VQ1CAT1VKI3SUMV" 145 http GET https://registry.npmjs.org/bluebird 146 verbose url raw lodash-node 147 verbose url resolving [ 'https://registry.npmjs.org/', './lodash-node' ] 148 verbose url resolved https://registry.npmjs.org/lodash-node 149 info trying registry request attempt 1 at 15:05:34 150 verbose etag "8JKC8M5UZEQ86VN07WLJS178X" 151 http GET https://registry.npmjs.org/lodash-node 152 http 304 https://registry.npmjs.org/bluebird 153 silly registry.get cb [ 304, 153 silly registry.get { date: 'Mon, 17 Mar 2014 19:05:34 GMT', 153 silly registry.get server: 'Apache', 153 silly registry.get via: '1.1 varnish', 153 silly registry.get 'last-modified': 'Mon, 17 Mar 2014 19:05:34 GMT', 153 silly registry.get 'cache-control': 'max-age=1', 153 silly registry.get etag: '"D9NR3A37I0VQ1CAT1VKI3SUMV"', 153 silly registry.get 'x-served-by': 'cache-jfk1032-JFK', 153 silly registry.get 'x-cache': 'MISS', 153 silly registry.get 'x-cache-hits': '0', 153 silly registry.get 'x-timer': 'S1395083134.666682243,VS0,VE105', 153 silly registry.get vary: 'Accept', 153 silly registry.get 'content-length': '0', 153 silly registry.get 'keep-alive': 'timeout=10, max=50', 153 silly registry.get connection: 'Keep-Alive' } ] 154 verbose etag bluebird from cache 155 http 304 https://registry.npmjs.org/lodash-node 156 silly registry.get cb [ 304, 156 silly registry.get { date: 'Mon, 17 Mar 2014 19:05:34 GMT', 156 silly registry.get server: 'Apache', 156 silly registry.get via: '1.1 varnish', 156 silly registry.get 'last-modified': 'Mon, 17 Mar 2014 19:05:34 GMT', 156 silly registry.get 'cache-control': 'max-age=1', 156 silly registry.get etag: '"8JKC8M5UZEQ86VN07WLJS178X"', 156 silly registry.get 'x-served-by': 'cache-jfk1022-JFK', 156 silly registry.get 'x-cache': 'HIT', 156 silly registry.get 'x-cache-hits': '1', 156 silly registry.get 'x-timer': 'S1395083134.678583860,VS0,VE106', 156 silly registry.get vary: 'Accept', 156 silly registry.get 'content-length': '0', 156 silly registry.get 'keep-alive': 'timeout=10, max=50', 156 silly registry.get connection: 'Keep-Alive' } ] 157 verbose etag lodash-node from cache 158 silly addNameRange number 2 { name: 'bluebird', range: '>=1.0.0-0 <1.1.0-0', hasData: true } 159 silly addNameRange versions [ 'bluebird', 159 silly addNameRange [ '0.7.1-1', 159 silly addNameRange '0.7.1-2', 159 silly addNameRange '0.7.1-3', 159 silly addNameRange '0.7.1-4', 159 silly addNameRange '0.7.1-5', 159 silly addNameRange '0.7.2-0', 159 silly addNameRange '0.7.3-0', 159 silly addNameRange '0.7.4-0', 159 silly addNameRange '0.7.4-1', 159 silly addNameRange '0.7.5-0', 159 silly addNameRange '0.7.6-0', 159 silly addNameRange '0.7.7-0', 159 silly addNameRange '0.7.7-1', 159 silly addNameRange '0.7.8-0', 159 silly addNameRange '0.7.8-1', 159 silly addNameRange '0.7.9-0', 159 silly addNameRange '0.7.9-1', 159 silly addNameRange '0.7.10-0', 159 silly addNameRange '0.7.10-1', 159 silly addNameRange '0.7.11-0', 159 silly addNameRange '0.7.12-0', 159 silly addNameRange '0.7.12-1', 159 silly addNameRange '0.7.12-2', 159 silly addNameRange '0.8.0-0', 159 silly addNameRange '0.8.0-1', 159 silly addNameRange '0.8.0-2', 159 silly addNameRange '0.8.0-3', 159 silly addNameRange '0.8.1-0', 159 silly addNameRange '0.8.2-0', 159 silly addNameRange '0.8.2-1', 159 silly addNameRange '0.8.2-2', 159 silly addNameRange '0.8.3-0', 159 silly addNameRange '0.8.3-1', 159 silly addNameRange '0.8.3-2', 159 silly addNameRange '0.8.3-3', 159 silly addNameRange '0.8.4-0', 159 silly addNameRange '0.8.4-1', 159 silly addNameRange '0.8.5-0', 159 silly addNameRange '0.8.5-1', 159 silly addNameRange '0.9.0-0', 159 silly addNameRange '0.9.1-0', 159 silly addNameRange '0.9.1-1', 159 silly addNameRange '0.9.2-0', 159 silly addNameRange '0.9.2-1', 159 silly addNameRange '0.9.3-0', 159 silly addNameRange '0.9.4-0', 159 silly addNameRange '0.9.4-1', 159 silly addNameRange '0.9.5-0', 159 silly addNameRange '0.9.6-0', 159 silly addNameRange '0.9.7-0', 159 silly addNameRange '0.9.8-0', 159 silly addNameRange '0.9.9-0', 159 silly addNameRange '0.9.10-0', 159 silly addNameRange '0.9.10-1', 159 silly addNameRange '0.9.11-0', 159 silly addNameRange '0.9.11-1', 159 silly addNameRange '0.10.0-0', 159 silly addNameRange '0.10.0-1', 159 silly addNameRange '0.10.1-0', 159 silly addNameRange '0.10.2-0', 159 silly addNameRange '0.10.2-1', 159 silly addNameRange '0.10.3-0', 159 silly addNameRange '0.10.4-0', 159 silly addNameRange '0.10.4-1', 159 silly addNameRange '0.10.5-0', 159 silly addNameRange '0.10.6-0', 159 silly addNameRange '0.10.7-0', 159 silly addNameRange '0.10.8-0', 159 silly addNameRange '0.10.9-0', 159 silly addNameRange '0.10.9-1', 159 silly addNameRange '0.10.10-0', 159 silly addNameRange '0.10.11-0', 159 silly addNameRange '0.10.11-1', 159 silly addNameRange '0.10.11-2', 159 silly addNameRange '0.10.11-4', 159 silly addNameRange '0.10.12-0', 159 silly addNameRange '0.10.13-0', 159 silly addNameRange '0.10.13-1', 159 silly addNameRange '0.10.14-0', 159 silly addNameRange '0.11.0-0', 159 silly addNameRange '0.11.1-0', 159 silly addNameRange '0.11.2-0', 159 silly addNameRange '0.11.3-0', 159 silly addNameRange '0.11.4-0', 159 silly addNameRange '0.11.4-1', 159 silly addNameRange '0.11.5-0', 159 silly addNameRange '0.11.5-1', 159 silly addNameRange '0.11.6-0', 159 silly addNameRange '1.0.0', 159 silly addNameRange '1.0.1', 159 silly addNameRange '1.0.2', 159 silly addNameRange '1.0.3', 159 silly addNameRange '1.0.4', 159 silly addNameRange '1.0.5', 159 silly addNameRange '1.0.7', 159 silly addNameRange '1.0.8', 159 silly addNameRange '1.1.0' ] ] 160 verbose addNamed [ 'bluebird', '1.0.8' ] 161 verbose addNamed [ '1.0.8', '1.0.8' ] 162 silly lockFile f8999073-bluebird-1-0-8 bluebird@1.0.8 163 verbose lock bluebird@1.0.8 C:\Users\A510246\AppData\Roaming\npm-cache\f8999073-bluebird-1-0-8.lock 164 silly addNameRange number 2 { name: 'lodash-node', 164 silly addNameRange range: '>=2.4.1-0 <2.5.0-0', 164 silly addNameRange hasData: true } 165 silly addNameRange versions [ 'lodash-node', 165 silly addNameRange [ '2.0.0', '2.1.0', '2.2.0', '2.2.1', '2.3.0', '2.4.0', '2.4.1' ] ] 166 verbose addNamed [ 'lodash-node', '2.4.1' ] 167 verbose addNamed [ '2.4.1', '2.4.1' ] 168 silly lockFile 624dae70-lodash-node-2-4-1 lodash-node@2.4.1 169 verbose lock lodash-node@2.4.1 C:\Users\A510246\AppData\Roaming\npm-cache\624dae70-lodash-node-2-4-1.lock 170 silly lockFile f8999073-bluebird-1-0-8 bluebird@1.0.8 171 silly lockFile f8999073-bluebird-1-0-8 bluebird@1.0.8 172 silly lockFile 624dae70-lodash-node-2-4-1 lodash-node@2.4.1 173 silly lockFile 624dae70-lodash-node-2-4-1 lodash-node@2.4.1 174 silly lockFile 2bf81154-bluebird-1-0-0 bluebird@~1.0.0 175 silly lockFile 2bf81154-bluebird-1-0-0 bluebird@~1.0.0 176 silly lockFile fe3d9342-lodash-node-2-4-1 lodash-node@~2.4.1 177 silly lockFile fe3d9342-lodash-node-2-4-1 lodash-node@~2.4.1 178 http 304 https://registry.npmjs.org/es6-import-validate 179 silly registry.get cb [ 304, 179 silly registry.get { date: 'Mon, 17 Mar 2014 19:05:34 GMT', 179 silly registry.get server: 'Apache', 179 silly registry.get via: '1.1 varnish', 179 silly registry.get 'last-modified': 'Mon, 17 Mar 2014 19:05:34 GMT', 179 silly registry.get 'cache-control': 'max-age=1', 179 silly registry.get etag: '"3FEM2FY2J6YSPTHVR9IQFKA4S"', 179 silly registry.get 'x-served-by': 'cache-jfk1031-JFK', 179 silly registry.get 'x-cache': 'MISS', 179 silly registry.get 'x-cache-hits': '0', 179 silly registry.get 'x-timer': 'S1395083134.669552326,VS0,VE214', 179 silly registry.get vary: 'Accept', 179 silly registry.get 'content-length': '0', 179 silly registry.get 'keep-alive': 'timeout=10, max=50', 179 silly registry.get connection: 'Keep-Alive' } ] 180 verbose etag es6-import-validate from cache 181 silly addNameRange number 2 { name: 'es6-import-validate', 181 silly addNameRange range: '>=0.0.7-0 <0.1.0-0', 181 silly addNameRange hasData: true } 182 silly addNameRange versions [ 'es6-import-validate', 182 silly addNameRange [ '0.0.1', 182 silly addNameRange '0.0.2', 182 silly addNameRange '0.0.3', 182 silly addNameRange '0.0.4', 182 silly addNameRange '0.0.5', 182 silly addNameRange '0.0.6', 182 silly addNameRange '0.0.7', 182 silly addNameRange '0.0.8' ] ] 183 verbose addNamed [ 'es6-import-validate', '0.0.8' ] 184 verbose addNamed [ '0.0.8', '0.0.8' ] 185 silly lockFile eb105b25-es6-import-validate-0-0-8 es6-import-validate@0.0.8 186 verbose lock es6-import-validate@0.0.8 C:\Users\A510246\AppData\Roaming\npm-cache\eb105b25-es6-import-validate-0-0-8.lock 187 silly lockFile eb105b25-es6-import-validate-0-0-8 es6-import-validate@0.0.8 188 silly lockFile eb105b25-es6-import-validate-0-0-8 es6-import-validate@0.0.8 189 silly lockFile 4585f1a6-es6-import-validate-0-0-7 es6-import-validate@~0.0.7 190 silly lockFile 4585f1a6-es6-import-validate-0-0-7 es6-import-validate@~0.0.7 191 silly resolved [ { name: 'bluebird', 191 silly resolved description: 'Full featured Promises/A+ implementation with exceptionally good performance', 191 silly resolved version: '1.0.8', 191 silly resolved keywords: 191 silly resolved [ 'promise', 191 silly resolved 'performance', 191 silly resolved 'promises', 191 silly resolved 'promises-a', 191 silly resolved 'promises-aplus', 191 silly resolved 'async', 191 silly resolved 'await', 191 silly resolved 'deferred', 191 silly resolved 'deferreds', 191 silly resolved 'future', 191 silly resolved 'flow control', 191 silly resolved 'dsl', 191 silly resolved 'fluent interface' ], 191 silly resolved scripts: { test: 'grunt test' }, 191 silly resolved homepage: 'https://github.com/petkaantonov/bluebird', 191 silly resolved repository: 191 silly resolved { type: 'git', 191 silly resolved url: 'git://github.com/petkaantonov/bluebird.git' }, 191 silly resolved bugs: { url: 'http://github.com/petkaantonov/bluebird/issues' }, 191 silly resolved license: 'MIT', 191 silly resolved author: 191 silly resolved { name: 'Petka Antonov', 191 silly resolved email: 'petka_antonov@hotmail.com', 191 silly resolved url: 'http://github.com/petkaantonov/' }, 191 silly resolved devDependencies: 191 silly resolved { grunt: '~0.4.1', 191 silly resolved 'grunt-contrib-jshint': '~0.6.4', 191 silly resolved 'grunt-contrib-watch': 'latest', 191 silly resolved 'grunt-contrib-connect': 'latest', 191 silly resolved 'grunt-saucelabs': 'latest', 191 silly resolved acorn: '~0.3.1', 191 silly resolved mocha: '~1.12.1', 191 silly resolved q: '~0.9.7', 191 silly resolved when: '~2.4.0', 191 silly resolved deferred: '~0.6.5', 191 silly resolved rsvp: '~2.0.4', 191 silly resolved avow: '~2.0.1', 191 silly resolved jsdom: '~0.8.4', 191 silly resolved 'jquery-browserify': '~1.8.1', 191 silly resolved sinon: '~1.7.3', 191 silly resolved kew: '~0.2.2', 191 silly resolved browserify: '~2.35.0', 191 silly resolved concurrent: '~0.3.2', 191 silly resolved 'text-table': '~0.2.0', 191 silly resolved 'grunt-cli': '~0.1.9', 191 silly resolved 'jshint-stylish': '~0.1.3', 191 silly resolved 'semver-utils': '~1.1.0', 191 silly resolved rimraf: '~2.2.6', 191 silly resolved mkdirp: '~0.3.5' }, 191 silly resolved readmeFilename: 'README.md', 191 silly resolved main: './js/main/bluebird.js', 191 silly resolved readme: 'Build Status\n\n\n <img src="http://promisesaplus.com/assets/logo-small.png" alt="Promises/A+ logo"\n title="Promises/A+ 1.0 compliant" align="right" />\n\n\n#Introduction\n\nBluebird is a fully featured promise library with focus on innovative features and performance\n\n#Topics\n\n- Features\n- Quick start\n- API Reference and examples\n- What are promises and why should I use them?\n- Questions and issues\n- Error handling\n- Development\n - Testing\n - Benchmarking\n - Custom builds\n - For library authors\n- What is the sync build?\n- License\n- Snippets for common problems\n- Promise anti-patterns\n- Changelog\n- Optimization guide\n\n#Features:\n\n- Promises A+ 2.0.2\n- Cancellation\n- Progression\n- Synchronous inspection\n- .bind\n- Complete parallel for C# 5.0 async and await\n- Collection methods such as All, any, some, settle, map, filter, reduce, spread, join, race...\n- Practical debugging solutions such as unhandled rejection reporting, typed catches, catching only what you expect and very long, relevant stack traces without losing perf\n- Sick performance\n\nPasses AP2, AP3, Cancellation, Progress tests and more. See testing.\n\n


\n\n#Quick start\n\n##Node.js\n\n npm install bluebird\n\nThen:\n\njs\nvar Promise = require("bluebird");\n\n\n##Browsers\n\nDownload the bluebird.js file. And then use a script tag:\n\nhtml\n<script type="text/javascript" src="/scripts/bluebird.js"></script>\n\n\nThe global variable Promise becomes available after the above script tag.\n\n####Browser support\n\nBrowsers that implement ECMA-262, edition 3 and later are supported.\n\nSelenium Test Status\n\nIE7 and IE8 had to be removed from tests due to SauceLabs bug but are supported and pass all tests\n\nNote that in ECMA-262, edition 3 (IE7, IE8 etc) it is not possible to use methods that have keyword names like .catch and .finally. The API documentation always lists a compatible alternative name that you can use if you need to support these browsers. For example .catch is replaced with .caught and .finally with .lastly.\n\nAlso, long stack trace support is only available in Chrome and Firefox.\n\nPreviously bluebird required es5-shim.js and es5-sham.js to support Edition 3 - these are no longer required as of 0.10.4.\n\nAfter quick start, see API Reference and examples\n\n
\n\n#What are promises and why should I use them?\n\nYou should use promises to turn this:\n\njs\nreadFile("file.json", function(err, val) {\n if( err ) {\n console.error("unable to read file");\n }\n else {\n try {\n val = JSON.parse(val);\n console.log(val.success);\n }\n catch( e ) {\n console.error("invalid json in file");\n }\n }\n});\n\n\nInto this:\n\njs\nreadFile("file.json").then(JSON.parse).then(function(val) {\n console.log(val.success);\n})\n.catch(SyntaxError, function(e) {\n console.error("invalid json in file");\n})\n.catch(function(e){\n console.error("unable to read file")\n});\n\n\nActually you might notice the latter has a lot in common with code that would do the same using synchronous I/O:\n\njs\ntry {\n var val = JSON.parse(readFile("file.json"));\n console.log(val.success);\n}\n//Syntax actually not supported in JS but drives the point\ncatch(SyntaxError e) {\n console.error("invalid json in file");\n}\ncatch(Error e) {\n console.error("unable to read file")\n}\n\n\nAnd that is the point - being able to have something that is a lot like return and throw in synchronous code.\n\nYou can also use promises to improve code that was written with callback helpers:\n\n\njs\n//Copyright Plato http://stackoverflow.com/a/19385911/995876\n//CC BY-SA 2.5\nmapSeries(URLs, function (URL, done) {\n var options = {};\n needle.get(URL, options, function (error, response, body) {\n if (error) {\n return done(error)\n }\n try {\n var ret = JSON.parse(body);\n return done(null, ret);\n }\n catch (e) {\n done(e);\n }\n });\n}, function (err, results) {\n if (err) {\n console.log(err)\n } else {\n console.log(\'All Needle requests successful\');\n // results is a 1 to 1 mapping in order of URLs > needle.body\n processAndSaveAllInDB(results, function (err) {\n if (err) {\n return done(err)\n }\n console.log(\'All Needle requests saved\');\n done(null);\n });\n }\n});\n\n\nIs more pleasing to the eye when done with promises:\n\njs\nPromise.promisifyAll(needle);\nvar options = {};\n\nvar current = Promise.resolve();\nPromise.map(URLs, function(URL) {\n current = current.then(function () {\n return needle.getAsync(URL, options);\n });\n return current;\n}).map(function(responseAndBody){\n return JSON.parse(responseAndBody[1]);\n}).then(function (results) {\n return processAndSaveAllInDB(results);\n}).then(function(){\n console.log(\'All Needle requests saved\');\n}).catch(function (e) {\n console.log(e);\n});\n\n\nAlso promises don\'t just give you correspondences for synchronous features but can also be used as limited event emitters or callback aggregators.\n\nMore reading:\n\n - Promise nuggets\n - Why I am switching to promises\n - What is the the point of promises\n - Snippets for common problems\n - Promise anti-patterns\n\n#Questions and issues\n\nIf you find a bug in bluebird or have a feature request, file an issue in the github issue tracker. Anything else, such as questions for help in using the library, should be posted in StackOverflow under tags promise and bluebird.\n\n#Error handling\n\nThis is a problem every promise library needs to handle in some way. Unhandled rejections/exceptions don\'t really have a good agreed-on asynchronous correspondence. The problem is that it is impossible to predict the future and know if a rejected promise will eventually be handled.\n\nThere are two common pragmatic attempts at solving the problem that promise libraries do.\n\nThe more popular one is to have the user explicitly communicate that they are done and any unhandled rejections should be thrown, like so:\n\njs\ndownload().then(...).then(...).done();\n\n\nFor handling this problem, in my opinion, this is completely unacceptable and pointless. The user must remember to explicitly call .done and that cannot be justified when the problem is forgetting to create an error handler in the first place.\n\nThe second approach, which is what bluebird by default takes, is to call a registered handler if a rejection is unhandled by the start of a second turn. The default handler is to write the stack trace to stderr or console.error in browsers. This is close to what happens with synchronous code - your code doens\'t work as expected and you open console and see a stack trace. Nice.\n\nOf course this is not perfect, if your code for some reason needs to swoop in and attach error handler to some promise after the promise has been hanging around a while then you will see annoying messages. In that case you can use the .done() method to signal that any hanging exceptions should be thrown.\n\nIf you want to override the default handler for these possibly unhandled rejections, you can pass yours like so:\n\njs\nPromise.onPossiblyUnhandledRejection(function(error){\n throw error;\n});\n\n\nIf you want to also enable long stack traces, call:\n\njs\nPromise.longStackTraces();\n\n\nright after the library is loaded.\n\nIn node.js use the environment flag BLUEBIRD_DEBUG:\n\n\nBLUEBIRD_DEBUG=1 node server.js\n\n\nto enable long stack traces in all instances of bluebird.\n\nLong stack traces cannot be disabled after being enabled, and cannot be enabled after promises have alread been created. Long stack traces imply a substantial performance penalty, even after using every trick to optimize them.\n\nLong stack traces are enabled by default in the debug build.\n\n####Expected and unexpected errors\n\nA practical problem with Promises/A+ is that it models Javascript try-catch too closely for its own good. Therefore by default promises inherit try-catch warts such as the inability to specify the error types that the catch block is eligible for. It is an anti-pattern in every other language to use catch-all handlers because they swallow exceptions that you might not know about.\n\nNow, Javascript does have a perfectly fine and working way of creating error type hierarchies. It is still quite awkward to use them with the built-in try-catch however:\n\njs\ntry {\n //code\n}\ncatch(e) {\n if( e instanceof WhatIWantError) {\n //handle\n }\n else {\n throw e;\n }\n}\n\n\nWithout such checking, unexpected errors would be silently swallowed. However, with promises, bluebird brings the future (hopefully) here now and extends the .catch to accept potential error type eligibility.\n\nFor instance here it is expected that some evil or incompetent entity will try to crash our server from SyntaxError by providing syntactically invalid JSON:\n\njs\ngetJSONFromSomewhere().then(function(jsonString) {\n return JSON.parse(jsonString);\n}).then(function(object) {\n console.log("it was valid json: ", object);\n}).catch(SyntaxError, function(e){\n console.log("don\'t be evil");\n});\n\n\nHere any kind of unexpected error will automatically reported on stderr along with a stack trace because we only register a handler for the expected SyntaxError.\n\nOk, so, that\'s pretty neat. But actually not many libraries define error types and it is in fact a complete ghetto out there with ad hoc strings being attached as some arbitrary property name like .name, .type, .code, not having any property at all or even throwing strings as errors and so on. So how can we still listen for expected errors?\n\nBluebird defines a special error type RejectionError (you can get a reference from Promise.RejectionError). This type of error is given as rejection reason by promisified methods when\ntheir underlying library gives an untyped, but expected error. Primitives such as strings, and error objects that are directly created like new Error("database didn\'t respond") are considered untyped.\n\nExample of such library is the node core library fs. So if we promisify it, we can catch just the errors we want pretty easily and have programmer errors be redirected to unhandled rejection handler so that we notice them:\n\njs\n//Read more about promisification in the API Reference:\n//https://github.com/petkaantonov/bluebird/blob/master/API.md\nvar fs = Promise.promisifyAll(require("fs"));\n\nfs.readFileAsync("myfile.json").then(JSON.parse).then(function (json) {\n console.log("Successful json")\n}).catch(SyntaxError, function (e) {\n console.error("file contains invalid json");\n}).catch(Promise.RejectionError, function (e) {\n console.error("unable to read file, because: ", e.message);\n});\n\n\nThe last catch handler is only invoked when the fs module explicitly used the err argument convention of async callbacks to inform of an expected error. The RejectionError instance will contain the original error in its .cause property but it does have a direct copy of the .message and .stack too. In this code any unexpected error - be it in our code or the fs module - would not be caught by these handlers and therefore not swallowed.\n\nSince a catch handler typed to Promise.RejectionError is expected to be used very often, it has a neat shorthand:\n\njs\n.error(function (e) {\n console.error("unable to read file, because: ", e.message);\n});\n\n\nSee API documentation for .error()\n\nFinally, Bluebird also supports predicate-based filters. If you pass a\npredicate function instead of an error type, the predicate will receive\nthe error as an argument. The return result will be used determine whether\nthe error handler should be called.\n\nPredicates should allow for very fine grained control over caught errors:\npattern matching, error typesets with set operations and many other techniques\ncan be implemented on top of them.\n\nExample of using a predicate-based filter:\n\njs\nvar Promise = require("bluebird");\nvar request = Promise.promisify(require("request"));\n\nfunction clientError(e) {\n return e.code >= 400 && e.code < 500;\n}\n\nrequest("http://www.google.com").then(function(contents){\n console.log(contents);\n}).catch(clientError, function(e){\n //A client error like 400 Bad Request happened\n});\n\n\nDanger: The JavaScript language allows throwing primitive values like strings. Throwing primitives can lead to worse or no stack traces. Primitives are not exceptions. You should consider always throwing Error objects when handling exceptions.\n\n
\n\n####How do long stack traces differ from e.g. Q?\n\nBluebird attempts to have more elaborate traces. Consider:\n\njs\nError.stackTraceLimit = 25;\nQ.longStackSupport = true;\nQ().then(function outer() {\n return Q().then(function inner() {\n return Q().then(function evenMoreInner() {\n a.b.c.d();\n }).catch(function catcher(e){\n console.error(e.stack);\n });\n })\n});\n\n\nYou will see\n\n ReferenceError: a is not defined\n at evenMoreInner (:7:13)\n From previous event:\n at inner (:6:20)\n\nCompare to:\n\njs\nError.stackTraceLimit = 25;\nPromise.longStackTraces();\nPromise.resolve().then(function outer() {\n return Promise.resolve().then(function inner() {\n return Promise.resolve().then(function evenMoreInner() {\n a.b.c.d()\n }).catch(function catcher(e){\n console.error(e.stack);\n });\n });\n});\n\n\n ReferenceError: a is not defined\n at evenMoreInner (:7:13)\n From previous event:\n at inner (:6:36)\n From previous event:\n at outer (:5:32)\n From previous event:\n at :4:21\n at Object.InjectedScript._evaluateOn (:572:39)\n at Object.InjectedScript._evaluateAndWrap (:531:52)\n at Object.InjectedScript.evaluate (:450:21)\n\n\nA better and more practical example of the differences can be seen in gorgikosev\'s debuggability competition.\n\n
\n\n####Can I use long stack traces in production?\n\nProbably yes. Bluebird uses multiple innovative techniques to optimize long stack traces. Even with long stack traces, it is still way faster than similarly featured implementations that don\'t have long stack traces enabled and about same speed as minimal implementations. A slowdown of 4-5x is expected, not 50x.\n\nWhat techniques are used?\n\n#####V8 API second argument\n\nThis technique utilizes the slightly under-documented second argument of V8 Error.captureStackTrace. It turns out that the second argument can actually be used to make V8 skip all library internal stack frames for free. It only requires propagation of callers manually in library internals but this is not visible to you as user at all.\n\nWithout this technique, every promise (well not every, see second technique) created would have to waste time creating and collecting library internal frames which will just be thrown away anyway. It also allows one to use smaller stack trace limits because skipped frames are not counted towards the limit whereas with collecting everything upfront and filtering afterwards would likely have to use higher limits to get more user stack frames in.\n\n#####Sharing stack traces\n\nConsider:\n\njs\nfunction getSomethingAsync(fileName) {\n return readFileAsync(fileName).then(function(){\n //...\n }).then(function() {\n //...\n }).then(function() {\n //...\n });\n}\n\n\nEverytime you call this function it creates 4 promises and in a straight-forward long stack traces implementation it would collect 4 almost identical stack traces. Bluebird has a light weight internal data-structure (kcnown as context stack in the source code) to help tracking when traces can be re-used and this example would only collect one trace.\n\n#####Lazy formatting\n\nAfter a stack trace has been collected on an object, one must be careful not to reference the .stack property until necessary. Referencing the property causes\nan expensive format call and the stack property is turned into a string which uses much more memory.\n\nWhat about Q #111?\n\nLong stack traces is not inherently the problem. For example with latest Q with stack traces disabled:\n\njs\nvar Q = require("q");\n\n\nfunction test(i){\n if (i <= 0){\n return Q.when(\'done\')\n } else {\n return Q.when(i-1).then(test)\n }\n}\ntest(1000000000).then(function(output){console.log(output) });\n\n\nAfter 2 minutes of running this, it will give:\n\njs\nFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory\n\n\nSo the problem with this is how much absolute memory is used per promise - not whether long traces are enabled or not.\n\nFor some purpose, let\'s say 100000 parallel pending promises in memory at the same time is the maximum. You would then roughly use 100MB for them instead of 10MB with stack traces disabled.For comparison, just creating 100000 functions alone will use 14MB if they\'re closures. All numbers can be halved for 32-bit node.\n\n
\n\n#Development\n\nFor development tasks such as running benchmarks or testing, you need to clone the repository and install dev-dependencies.\n\nInstall node, npm, and grunt.\n\n git clone git@github.com:petkaantonov/bluebird.git\n cd bluebird\n npm install\n\n##Testing\n\nTo run all tests, run grunt test. Note that 10 processes are created to run the tests in parallel. The stdout of tests is ignored by default and everything will stop at the first failure.\n\nIndividual files can be run with grunt test --run=filename where filename is a test file name in /test folder or /test/mocha folder. The .js prefix is not needed. The dots for AP compliance tests are not needed, so to run /test/mocha/2.3.3.js for instance:\n\n grunt test --run=233\n\nWhen trying to get a test to pass, run only that individual test file with --verbose to see the output from that test:\n\n grunt test --run=233 --verbose\n\nThe reason for the unusual way of testing is because the majority of tests are from different libraries using different testing frameworks and because it takes forever to test sequentially.\n\n\n###Testing in browsers\n\nTo test in browsers:\n\n cd browser\n setup\n\nThen open the index.html in your browser. Requires bash (on windows the mingw32 that comes with git works fine too).\n\nYou may also visit the github hosted page.\n\nKeep the test tab active because some tests are timing-sensitive and will fail if the browser is throttling timeouts. Chrome will do this for example when the tab is not active.\n\n##Benchmarks\n\nTo run a benchmark, run the given command for a benchmark while on the project root. Requires bash (on windows the mingw32 that comes with git works fine too).\n\nNode 0.11.2+ is required to run the generator examples.\n\n###1. DoxBee sequential\n\nCurrently the most relevant benchmark is @gorkikosev\'s benchmark in the article Analysis of generators and other async patterns in node. The benchmark emulates a situation where n amount of users are making a request in parallel to execute some mixed async/sync action. The benchmark has been modified to include a warm-up phase to minimize any JITing during timed sections.\n\nCommand: bench doxbee\n\n###2. Made-up parallel\n\nThis made-up scenario runs 15 shimmed queries in parallel.\n\nCommand: bench parallel\n\n##Custom builds\n\nCustom builds for browsers are supported through a command-line utility.\n\n\n\n\n\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n
The following features can be disabled
Feature(s)Command line identifier
.any and Promise.anyany
.race and Promise.racerace
.call and .getcall_get
.filter and Promise.filterfilter
.map and Promise.mapmap
.reduce and Promise.reducereduce
.props and Promise.propsprops
.settle and Promise.settlesettle
.some and Promise.somesome
.nodeifynodeify
Promise.coroutine and Promise.spawngenerators
Progressionprogress
Promisificationpromisify
Cancellationcancel
Synchronous inspectionsynchronous_inspection
Timerstimers
\n\n\nMake sure you have cloned the repo somewhere and did npm install successfully.\n\nAfter that you can run:\n\n grunt build --features="core"\n\n\nThe above builds the most minimal build you can get. You can add more features separated by spaces from the above list:\n\n grunt build --features="core filter map reduce"\n\nThe custom build file will be found from /js/browser/bluebird.js. It will have a comment that lists the disabled and enabled features.\n\nNote that the build leaves the /js/main etc folders with same features so if you use the folder for node.js at the same time, don\'t forget to build\na full version afterwards (after having taken a copy of the bluebird.js somewhere):\n\n grunt build\n\n
\n\n##For library authors\n\nBuilding a library that depends on bluebird? You should know about a few features.\n\nIf your library needs to do something obtrusive like adding or modifying methods on the Promise prototype, uses long stack traces or uses a custom unhandled rejection handler then... that\'s totally ok as long as you don\'t use require("bluebird"). Instead you should create a file\nthat creates an isolated copy. For example, creating a file called bluebird-extended.js that contains:\n\njs\n //NOTE the function call right after\nmodule.exports = require("bluebird/js/main/promise")();\n\n\nYour library can then use var Promise = require("bluebird-extended"); and do whatever it wants with it. Then if the application or other library uses their own bluebird promises they will all play well together because of Promises/A+ thenable assimilation magic.\n\nYou should also know about .nodeify() which makes it easy to provide a dual callback/promise API.\n\n
\n\n##What is the sync build?\n\nYou may now use sync build by:\n\n var Promise = require("bluebird/zalgo");\n\nThe sync build is provided to see how forced asynchronity affects benchmarks. It should not be used in real code due to the implied hazards.\n\nThe normal async build gives Promises/A+ guarantees about asynchronous resolution of promises. Some people think this affects performance or just plain love their code having a possibility\nof stack overflow errors and non-deterministic behavior.\n\nThe sync build skips the async call trampoline completely, e.g code like:\n\n async.invoke( this.fn, this, val );\n\nAppears as this in the sync build:\n\n this.fn(val);\n\nThis should pressure the CPU slightly less and thus the sync build should perform better. Indeed it does, but only marginally. The biggest performance boosts are from writing efficient Javascript, not from compromising determinism.\n\nNote that while some benchmarks are waiting for the next event tick, the CPU is actually not in use during that time. So the resulting benchmark result is not completely accurate because on node.js you only care about how much the CPU is taxed. Any time spent on CPU is time the whole process (or server) is paralyzed. And it is not graceful like it would be with threads.\n\n\njs\nvar cache = new Map(); //ES6 Map or DataStructures/Map or whatever...\nfunction getResult(url) {\n var resolver = Promise.pending();\n if (cache.has(url)) {\n resolver.resolve(cache.get(url));\n }\n else {\n http.get(url, function(err, content) {\n if (err) resolver.reject(err);\n else {\n cache.set(url, content);\n resolver.resolve(content);\n }\n });\n }\n return resolver.promise;\n}\n\n\n\n//The result of console.log is truly random without async guarantees\nfunction guessWhatItPrints( url ) {\n var i = 3;\n getResult(url).then(function(){\n i = 4;\n });\n console.log(i);\n}\n\n\n#Optimization guide\n\nArticles about optimization will be periodically posted in the wiki section, polishing edits are welcome.\n\nA single cohesive guide compiled from the articles will probably be done eventually.\n\n#License\n\nCopyright (c) 2014 Petka Antonov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:

\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n', 191 silly resolved _id: 'bluebird@1.0.8', 191 silly resolved from: 'bluebird@~1.0.0' }, 191 silly resolved { name: 'lodash-node', 191 silly resolved version: '2.4.1', 191 silly resolved description: 'A collection of Lo-Dash methods as Node.js modules generated by lodash-cli.', 191 silly resolved homepage: 'http://lodash.com/custom-builds', 191 silly resolved license: 'MIT', 191 silly resolved main: 'modern/index.js', 191 silly resolved keywords: [ 'customize', 'functional', 'lodash', 'modules', 'server', 'util' ], 191 silly resolved author: 191 silly resolved { name: 'John-David Dalton', 191 silly resolved email: 'john.david.dalton@gmail.com', 191 silly resolved url: 'http://allyoucanleet.com/' }, 191 silly resolved contributors: [ [Object], [Object], [Object], [Object] ], 191 silly resolved bugs: { url: 'https://github.com/lodash/lodash-cli/issues' }, 191 silly resolved repository: 191 silly resolved { type: 'git', 191 silly resolved url: 'https://github.com/lodash/lodash-node.git' }, 191 silly resolved readme: '# lodash-node v2.4.1\n\nA collection of Lo-Dash methods as Node.js modules generated by lodash-cli.\n\n## Installation & usage\n\nUsing npm:\n\nbash\nnpm i --save lodash-node\n\n{sudo} npm i -g lodash-node\nnpm ln lodash-node\n\n\nIn Node.js:\n\n`js\nvar = require(\'lodash-node\');\n\n// or as Underscore\nvar _ = require(\'lodash-node/underscore\');\n\n// or by method category\nvar collections = require(\'lodash-node/modern/collections\');\n\n// or individual methods\nvar isEqual = require(\'lodash-node/modern/objects/isEqual\');\nvar findWhere = require(\'lodash-node/underscore/collections/findWhere\');\n\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton) |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz) | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge) | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias) |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/lodash/lodash-node/trend.png)](https://bitdeli.com/free)\n', 191 silly resolved readmeFilename: 'README.md', 191 silly resolved _id: 'lodash-node@2.4.1', 191 silly resolved _from: 'lodash-node@~2.4.1' }, 191 silly resolved { name: 'es6-import-validate', 191 silly resolved version: '0.0.8', 191 silly resolved description: 'A simple ES6 Harmony Module import statement validator', 191 silly resolved main: 'index.js', 191 silly resolved scripts: 191 silly resolved { test: 'node_modules/jshint/bin/jshint lib/_.js test/_.js test/fixtures/_.js && node_modules/mocha/bin/mocha -R spec', 191 silly resolved coverage: 'node_modules/jshint/bin/jshint lib/_.js test/_.js test/fixtures/_.js && node_modules/mocha/bin/mocha -r blanket -R html-cov > coverage.html && open coverage.html' }, 191 silly resolved repository: 191 silly resolved { type: 'git', 191 silly resolved url: 'git://github.com/sproutsocial/es6-import-validate.git' }, 191 silly resolved keywords: [ 'es6', 'harmony', 'module', 'validate' ], 191 silly resolved author: { name: 'Jacob Gable', email: 'jacob.gable@gmail.com' }, 191 silly resolved license: 'MIT', 191 silly resolved bugs: { url: 'https://github.com/sproutsocial/es6-import-validate/issues' }, 191 silly resolved devDependencies: 191 silly resolved { should: '~3.1.0', 191 silly resolved mocha: '~1.17.1', 191 silly resolved jshint: '~2.4.2', 191 silly resolved sinon: '~1.7.3', 191 silly resolved blanket: '~1.1.6' }, 191 silly resolved dependencies: 191 silly resolved { 'lodash-node': '~2.4.1', 191 silly resolved bluebird: '~1.0.0', 191 silly resolved esprima: 'git://github.com/jgable/esprima.git#exportDefaultObject' }, 191 silly resolved config: { blanket: [Object] }, 191 silly resolved readme: 'es6-import-validate [![Build Status](https://travis-ci.org/sproutsocial/es6-import-validate.png?branch=master)](https://travis-ci.org/sproutsocial/es6-import-validate)\n===================\n\nA simple ES6 Harmony Module import statement validator.\n\n### Example\n\nTaken from the unit tests.\n\njavascript\nvar cwd = path.join(__dirname, \'fixtures\'),\n files = [\n path.join(cwd, \'foo.js\'),\n path.join(cwd, \'bar.js\'),\n path.join(cwd, \'baz.js\')\n ];\n\nES6ModuleFile.validateImports(files, { cwd: cwd })\n .then(function (result) {\n done(new Error(\'Should reject when errors are found\'));\n })\n .catch(function (errors) {\n should.exist(errors);\n \n errors.length.should.equal(1);\n\n errors[0].name.should.equal(\'baz\');\n errors[0].filePath.should.equal(files[2]);\n errors[0].message.should.equal(\'Cannot find "missing" export for "foo"\');\n\n done();\n });\n`\n\n### License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Sprout Social\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the "Software"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n', 191 silly resolved readmeFilename: 'README.md', 191 silly resolved homepage: 'https://github.com/sproutsocial/es6-import-validate', 191 silly resolved _id: 'es6-import-validate@0.0.8', 191 silly resolved _from: 'es6-import-validate@~0.0.7' } ] 192 info install bluebird@1.0.8 into C:\eak\node_modules\grunt-es6-import-validate 193 info install lodash-node@2.4.1 into C:\eak\node_modules\grunt-es6-import-validate 194 info install es6-import-validate@0.0.8 into C:\eak\node_modules\grunt-es6-import-validate 195 info installOne bluebird@1.0.8 196 info installOne lodash-node@2.4.1 197 info installOne es6-import-validate@0.0.8 198 info C:\eak\node_modules\grunt-es6-import-validate\node_modules\bluebird unbuild 199 info C:\eak\node_modules\grunt-es6-import-validate\node_modules\lodash-node unbuild 200 info C:\eak\node_modules\grunt-es6-import-validate\node_modules\es6-import-validate unbuild 201 verbose tar unpack C:\Users\A510246\AppData\Roaming\npm-cache\bluebird\1.0.8\package.tgz 202 silly lockFile d6f8db4a-t-validate-node-modules-bluebird tar://C:\eak\node_modules\grunt-es6-import-validate\node_modules\bluebird 203 verbose lock tar://C:\eak\node_modules\grunt-es6-import-validate\node_modules\bluebird C:\Users\A510246\AppData\Roaming\npm-cache\d6f8db4a-t-validate-node-modules-bluebird.lock 204 silly lockFile 4a976d48-cache-bluebird-1-0-8-package-tgz tar://C:\Users\A510246\AppData\Roaming\npm-cache\bluebird\1.0.8\package.tgz 205 verbose lock tar://C:\Users\A510246\AppData\Roaming\npm-cache\bluebird\1.0.8\package.tgz C:\Users\A510246\AppData\Roaming\npm-cache\4a976d48-cache-bluebird-1-0-8-package-tgz.lock 206 verbose tar unpack C:\Users\A510246\AppData\Roaming\npm-cache\lodash-node\2.4.1\package.tgz 207 silly lockFile 84fb00da-alidate-node-modules-lodash-node tar://C:\eak\node_modules\grunt-es6-import-validate\node_modules\lodash-node 208 verbose lock tar://C:\eak\node_modules\grunt-es6-import-validate\node_modules\lodash-node C:\Users\A510246\AppData\Roaming\npm-cache\84fb00da-alidate-node-modules-lodash-node.lock 209 silly lockFile 3dc20e29-he-lodash-node-2-4-1-package-tgz tar://C:\Users\A510246\AppData\Roaming\npm-cache\lodash-node\2.4.1\package.tgz 210 verbose lock tar://C:\Users\A510246\AppData\Roaming\npm-cache\lodash-node\2.4.1\package.tgz C:\Users\A510246\AppData\Roaming\npm-cache\3dc20e29-he-lodash-node-2-4-1-package-tgz.lock 211 verbose tar unpack C:\Users\A510246\AppData\Roaming\npm-cache\es6-import-validate\0.0.8\package.tgz 212 silly lockFile e521f03f-node-modules-es6-import-validate tar://C:\eak\node_modules\grunt-es6-import-validate\node_modules\es6-import-validate 213 verbose lock tar://C:\eak\node_modules\grunt-es6-import-validate\node_modules\es6-import-validate C:\Users\A510246\AppData\Roaming\npm-cache\e521f03f-node-modules-es6-import-validate.lock 214 silly lockFile eb0ead3a-mport-validate-0-0-8-package-tgz tar://C:\Users\A510246\AppData\Roaming\npm-cache\es6-import-validate\0.0.8\package.tgz 215 verbose lock tar://C:\Users\A510246\AppData\Roaming\npm-cache\es6-import-validate\0.0.8\package.tgz C:\Users\A510246\AppData\Roaming\npm-cache\eb0ead3a-mport-validate-0-0-8-package-tgz.lock 216 silly gunzTarPerm modes [ '755', '644' ] 217 silly gunzTarPerm modes [ '755', '644' ] 218 silly gunzTarPerm modes [ '755', '644' ] 219 silly gunzTarPerm extractEntry package.json 220 silly gunzTarPerm modified mode [ 'package.json', 438, 420 ] 221 silly gunzTarPerm extractEntry package.json 222 silly gunzTarPerm modified mode [ 'package.json', 438, 420 ] 223 silly gunzTarPerm extractEntry package.json 224 silly gunzTarPerm modified mode [ 'package.json', 438, 420 ] 225 silly gunzTarPerm extractEntry .npmignore 226 silly gunzTarPerm modified mode [ '.npmignore', 438, 420 ] 227 silly gunzTarPerm extractEntry README.md 228 silly gunzTarPerm modified mode [ 'README.md', 438, 420 ] 229 silly gunzTarPerm extractEntry .npmignore 230 silly gunzTarPerm modified mode [ '.npmignore', 438, 420 ] 231 silly gunzTarPerm extractEntry README.md 232 silly gunzTarPerm modified mode [ 'README.md', 438, 420 ] 233 silly gunzTarPerm extractEntry README.md 234 silly gunzTarPerm modified mode [ 'README.md', 438, 420 ] 235 silly gunzTarPerm extractEntry compat/utilities.js 236 silly gunzTarPerm modified mode [ 'compat/utilities.js', 438, 420 ] 237 silly gunzTarPerm extractEntry compat/support.js 238 silly gunzTarPerm modified mode [ 'compat/support.js', 438, 420 ] 239 silly gunzTarPerm extractEntry compat/chaining.js 240 silly gunzTarPerm modified mode [ 'compat/chaining.js', 438, 420 ] 241 silly gunzTarPerm extractEntry LICENSE 242 silly gunzTarPerm modified mode [ 'LICENSE', 438, 420 ] 243 silly gunzTarPerm extractEntry LICENSE 244 silly gunzTarPerm modified mode [ 'LICENSE', 438, 420 ] 245 silly gunzTarPerm extractEntry index.js 246 silly gunzTarPerm modified mode [ 'index.js', 438, 420 ] 247 silly gunzTarPerm extractEntry compat/objects.js 248 silly gunzTarPerm modified mode [ 'compat/objects.js', 438, 420 ] 249 silly gunzTarPerm extractEntry compat/collections.js 250 silly gunzTarPerm modified mode [ 'compat/collections.js', 438, 420 ] 251 silly gunzTarPerm extractEntry bundle.js 252 silly gunzTarPerm modified mode [ 'bundle.js', 438, 420 ] 253 silly gunzTarPerm extractEntry Gruntfile.js 254 silly gunzTarPerm modified mode [ 'Gruntfile.js', 438, 420 ] 255 silly gunzTarPerm extractEntry .jshintrc 256 silly gunzTarPerm modified mode [ '.jshintrc', 438, 420 ] 257 silly gunzTarPerm extractEntry .travis.yml 258 silly gunzTarPerm modified mode [ '.travis.yml', 438, 420 ] 259 silly gunzTarPerm extractEntry compat/index.js 260 silly gunzTarPerm modified mode [ 'compat/index.js', 438, 420 ] 261 silly gunzTarPerm extractEntry compat/arrays.js 262 silly gunzTarPerm modified mode [ 'compat/arrays.js', 438, 420 ] 263 silly gunzTarPerm extractEntry lib/ES6ModuleFile.js 264 silly gunzTarPerm modified mode [ 'lib/ES6ModuleFile.js', 438, 420 ] 265 silly gunzTarPerm extractEntry test/all_spec.js 266 silly gunzTarPerm modified mode [ 'test/all_spec.js', 438, 420 ] 267 silly gunzTarPerm extractEntry test/.jshintrc 268 silly gunzTarPerm modified mode [ 'test/.jshintrc', 438, 420 ] 269 silly gunzTarPerm extractEntry test/fixtures/bar.js 270 silly gunzTarPerm modified mode [ 'test/fixtures/bar.js', 438, 420 ] 271 silly gunzTarPerm extractEntry test/fixtures/baz.js 272 silly gunzTarPerm modified mode [ 'test/fixtures/baz.js', 438, 420 ] 273 silly gunzTarPerm extractEntry test/fixtures/foo.js 274 silly gunzTarPerm modified mode [ 'test/fixtures/foo.js', 438, 420 ] 275 silly gunzTarPerm extractEntry test/fixtures/.jshintrc 276 silly gunzTarPerm modified mode [ 'test/fixtures/.jshintrc', 438, 420 ] 277 silly gunzTarPerm extractEntry test/fixtures/renamed/bar.js 278 silly gunzTarPerm modified mode [ 'test/fixtures/renamed/bar.js', 438, 420 ] 279 silly gunzTarPerm extractEntry test/fixtures/renamed/baz.js 280 silly gunzTarPerm modified mode [ 'test/fixtures/renamed/baz.js', 438, 420 ] 281 silly gunzTarPerm extractEntry test/fixtures/renamed/foo.js 282 silly gunzTarPerm modified mode [ 'test/fixtures/renamed/foo.js', 438, 420 ] 283 silly gunzTarPerm extractEntry test/fixtures/renamed/nested/thing.js 284 silly gunzTarPerm modified mode [ 'test/fixtures/renamed/nested/thing.js', 438, 420 ] 285 silly gunzTarPerm extractEntry compat/functions.js 286 silly gunzTarPerm modified mode [ 'compat/functions.js', 438, 420 ] 287 silly gunzTarPerm extractEntry compat/functions/after.js 288 silly gunzTarPerm modified mode [ 'compat/functions/after.js', 438, 420 ] 289 silly gunzTarPerm extractEntry zalgo.js 290 silly gunzTarPerm modified mode [ 'zalgo.js', 438, 420 ] 291 silly gunzTarPerm extractEntry API.md 292 silly gunzTarPerm modified mode [ 'API.md', 438, 420 ] 293 silly gunzTarPerm extractEntry compat/functions/compose.js 294 silly gunzTarPerm modified mode [ 'compat/functions/compose.js', 438, 420 ] 295 silly gunzTarPerm extractEntry compat/functions/createCallback.js 296 silly gunzTarPerm modified mode [ 'compat/functions/createCallback.js', 438, 420 ] 297 silly gunzTarPerm extractEntry compat/functions/curry.js 298 silly gunzTarPerm modified mode [ 'compat/functions/curry.js', 438, 420 ] 299 silly gunzTarPerm extractEntry compat/functions/debounce.js 300 silly gunzTarPerm modified mode [ 'compat/functions/debounce.js', 438, 420 ] 301 silly gunzTarPerm extractEntry js/main/any.js 302 silly gunzTarPerm modified mode [ 'js/main/any.js', 438, 420 ] 303 silly gunzTarPerm extractEntry js/main/map.js 304 silly gunzTarPerm modified mode [ 'js/main/map.js', 438, 420 ] 305 silly gunzTarPerm extractEntry js/main/nodeify.js 306 silly gunzTarPerm modified mode [ 'js/main/nodeify.js', 438, 420 ] 307 silly gunzTarPerm extractEntry js/main/progress.js 308 silly gunzTarPerm modified mode [ 'js/main/progress.js', 438, 420 ] 309 silly gunzTarPerm extractEntry compat/functions/bindKey.js 310 silly gunzTarPerm modified mode [ 'compat/functions/bindKey.js', 438, 420 ] 311 silly gunzTarPerm extractEntry compat/functions/delay.js 312 silly gunzTarPerm modified mode [ 'compat/functions/delay.js', 438, 420 ] 313 silly gunzTarPerm extractEntry compat/functions/memoize.js 314 silly gunzTarPerm modified mode [ 'compat/functions/memoize.js', 438, 420 ] 315 silly gunzTarPerm extractEntry compat/functions/once.js 316 silly gunzTarPerm modified mode [ 'compat/functions/once.js', 438, 420 ] 317 silly gunzTarPerm extractEntry js/main/global.js 318 silly gunzTarPerm modified mode [ 'js/main/global.js', 438, 420 ] 319 silly gunzTarPerm extractEntry js/main/promise_array.js 320 silly gunzTarPerm modified mode [ 'js/main/promise_array.js', 438, 420 ] 321 silly gunzTarPerm extractEntry compat/functions/partial.js 322 silly gunzTarPerm modified mode [ 'compat/functions/partial.js', 438, 420 ] 323 silly gunzTarPerm extractEntry compat/functions/partialRight.js 324 silly gunzTarPerm modified mode [ 'compat/functions/partialRight.js', 438, 420 ] 325 silly gunzTarPerm extractEntry js/main/promise_inspection.js 326 silly gunzTarPerm modified mode [ 'js/main/promise_inspection.js', 438, 420 ] 327 silly gunzTarPerm extractEntry js/main/promise_resolver.js 328 silly gunzTarPerm modified mode [ 'js/main/promise_resolver.js', 438, 420 ] 329 silly gunzTarPerm extractEntry compat/functions/bindAll.js 330 silly gunzTarPerm modified mode [ 'compat/functions/bindAll.js', 438, 420 ] 331 silly gunzTarPerm extractEntry compat/functions/throttle.js 332 silly gunzTarPerm modified mode [ 'compat/functions/throttle.js', 438, 420 ] 333 silly gunzTarPerm extractEntry compat/functions/bind.js 334 silly gunzTarPerm modified mode [ 'compat/functions/bind.js', 438, 420 ] 335 silly gunzTarPerm extractEntry compat/functions/wrap.js 336 silly gunzTarPerm modified mode [ 'compat/functions/wrap.js', 438, 420 ] 337 silly gunzTarPerm extractEntry compat/functions/defer.js 338 silly gunzTarPerm modified mode [ 'compat/functions/defer.js', 438, 420 ] 339 silly gunzTarPerm extractEntry compat/internals/arrayPool.js 340 silly gunzTarPerm modified mode [ 'compat/internals/arrayPool.js', 438, 420 ] 341 silly gunzTarPerm extractEntry js/main/promise_spawn.js 342 silly gunzTarPerm modified mode [ 'js/main/promise_spawn.js', 438, 420 ] 343 silly gunzTarPerm extractEntry js/main/promisify.js 344 silly gunzTarPerm modified mode [ 'js/main/promisify.js', 438, 420 ] 345 silly gunzTarPerm extractEntry compat/internals/defaultsIteratorOptions.js 346 silly gunzTarPerm modified mode [ 'compat/internals/defaultsIteratorOptions.js', 438, 420 ] 347 silly gunzTarPerm extractEntry compat/internals/eachIteratorOptions.js 348 silly gunzTarPerm modified mode [ 'compat/internals/eachIteratorOptions.js', 438, 420 ] 349 silly gunzTarPerm extractEntry js/main/generators.js 350 silly gunzTarPerm modified mode [ 'js/main/generators.js', 438, 420 ] 351 silly gunzTarPerm extractEntry js/main/properties_promise_array.js 352 silly gunzTarPerm modified mode [ 'js/main/properties_promise_array.js', 438, 420 ] 353 silly gunzTarPerm extractEntry compat/internals/escapeHtmlChar.js 354 silly gunzTarPerm modified mode [ 'compat/internals/escapeHtmlChar.js', 438, 420 ] 355 silly gunzTarPerm extractEntry compat/internals/createWrapper.js 356 silly gunzTarPerm modified mode [ 'compat/internals/createWrapper.js', 438, 420 ] 357 silly gunzTarPerm extractEntry compat/internals/forOwnIteratorOptions.js 358 silly gunzTarPerm modified mode [ 'compat/internals/forOwnIteratorOptions.js', 438, 420 ] 359 silly gunzTarPerm extractEntry compat/internals/getArray.js 360 silly gunzTarPerm modified mode [ 'compat/internals/getArray.js', 438, 420 ] 361 silly gunzTarPerm extractEntry js/main/finally.js 362 silly gunzTarPerm modified mode [ 'js/main/finally.js', 438, 420 ] 363 silly gunzTarPerm extractEntry js/main/props.js 364 silly gunzTarPerm modified mode [ 'js/main/props.js', 438, 420 ] 365 silly gunzTarPerm extractEntry compat/internals/getObject.js 366 silly gunzTarPerm modified mode [ 'compat/internals/getObject.js', 438, 420 ] 367 silly gunzTarPerm extractEntry compat/internals/htmlEscapes.js 368 silly gunzTarPerm modified mode [ 'compat/internals/htmlEscapes.js', 438, 420 ] 369 silly gunzTarPerm extractEntry js/main/filter.js 370 silly gunzTarPerm modified mode [ 'js/main/filter.js', 438, 420 ] 371 silly gunzTarPerm extractEntry js/main/queue.js 372 silly gunzTarPerm modified mode [ 'js/main/queue.js', 438, 420 ] 373 silly gunzTarPerm extractEntry compat/internals/htmlUnescapes.js 374 silly gunzTarPerm modified mode [ 'compat/internals/htmlUnescapes.js', 438, 420 ] 375 silly gunzTarPerm extractEntry compat/internals/createIterator.js 376 silly gunzTarPerm modified mode [ 'compat/internals/createIterator.js', 438, 420 ] 377 silly gunzTarPerm extractEntry js/main/es5.js 378 silly gunzTarPerm modified mode [ 'js/main/es5.js', 438, 420 ] 379 silly gunzTarPerm extractEntry js/main/race.js 380 silly gunzTarPerm modified mode [ 'js/main/race.js', 438, 420 ] 381 silly lockFile e521f03f-node-modules-es6-import-validate tar://C:\eak\node_modules\grunt-es6-import-validate\node_modules\es6-import-validate 382 silly lockFile e521f03f-node-modules-es6-import-validate tar://C:\eak\node_modules\grunt-es6-import-validate\node_modules\es6-import-validate 383 silly lockFile eb0ead3a-mport-validate-0-0-8-package-tgz tar://C:\Users\A510246\AppData\Roaming\npm-cache\es6-import-validate\0.0.8\package.tgz 384 silly lockFile eb0ead3a-mport-validate-0-0-8-package-tgz tar://C:\Users\A510246\AppData\Roaming\npm-cache\es6-import-validate\0.0.8\package.tgz 385 silly gunzTarPerm extractEntry compat/internals/indicatorObject.js 386 silly gunzTarPerm modified mode [ 'compat/internals/indicatorObject.js', 438, 420 ] 387 silly gunzTarPerm extractEntry compat/internals/createCache.js 388 silly gunzTarPerm modified mode [ 'compat/internals/createCache.js', 438, 420 ] 389 info preinstall es6-import-validate@0.0.8 390 verbose readDependencies using package.json deps 391 verbose readDependencies using package.json deps 392 silly gunzTarPerm extractEntry js/main/errors_api_rejection.js 393 silly gunzTarPerm modified mode [ 'js/main/errors_api_rejection.js', 438, 420 ] 394 silly gunzTarPerm extractEntry js/main/reduce.js 395 silly gunzTarPerm modified mode [ 'js/main/reduce.js', 438, 420 ] 396 silly gunzTarPerm extractEntry compat/internals/isNative.js 397 silly gunzTarPerm modified mode [ 'compat/internals/isNative.js', 438, 420 ] 398 silly gunzTarPerm extractEntry compat/internals/createAggregator.js 399 silly gunzTarPerm modified mode [ 'compat/internals/createAggregator.js', 438, 420 ] 400 silly gunzTarPerm extractEntry compat/internals/isNode.js 401 silly gunzTarPerm modified mode [ 'compat/internals/isNode.js', 438, 420 ] 402 silly gunzTarPerm extractEntry compat/internals/compareAscending.js 403 silly gunzTarPerm modified mode [ 'compat/internals/compareAscending.js', 438, 420 ] 404 silly gunzTarPerm extractEntry js/main/errors.js 405 silly gunzTarPerm modified mode [ 'js/main/errors.js', 438, 420 ] 406 silly gunzTarPerm extractEntry js/main/schedule.js 407 silly gunzTarPerm modified mode [ 'js/main/schedule.js', 438, 420 ] 408 verbose cache add [ 'esprima@git://github.com/jgable/esprima.git#exportDefaultObject', 408 verbose cache add null ] 409 verbose cache add name=undefined spec="esprima@git://github.com/jgable/esprima.git#exportDefaultObject" args=["esprima@git://github.com/jgable/esprima.git#exportDefaultObject",null] 410 verbose parsed url { protocol: null, 410 verbose parsed url slashes: null, 410 verbose parsed url auth: null, 410 verbose parsed url host: null, 410 verbose parsed url port: null, 410 verbose parsed url hostname: null, 410 verbose parsed url hash: '#exportDefaultObject', 410 verbose parsed url search: null, 410 verbose parsed url query: null, 410 verbose parsed url pathname: 'esprima@git://github.com/jgable/esprima.git', 410 verbose parsed url path: 'esprima@git://github.com/jgable/esprima.git', 410 verbose parsed url href: 'esprima@git://github.com/jgable/esprima.git#exportDefaultObject' } 411 verbose cache add name="esprima" spec="git://github.com/jgable/esprima.git#exportDefaultObject" args=["esprima","git://github.com/jgable/esprima.git#exportDefaultObject"] 412 verbose parsed url { protocol: 'git:', 412 verbose parsed url slashes: true, 412 verbose parsed url auth: null, 412 verbose parsed url host: 'github.com', 412 verbose parsed url port: null, 412 verbose parsed url hostname: 'github.com', 412 verbose parsed url hash: '#exportDefaultObject', 412 verbose parsed url search: null, 412 verbose parsed url query: null, 412 verbose parsed url pathname: '/jgable/esprima.git', 412 verbose parsed url path: '/jgable/esprima.git', 412 verbose parsed url href: 'git://github.com/jgable/esprima.git#exportDefaultObject' } 413 silly lockFile 3cc93090--esprima-git-exportDefaultObject git://github.com/jgable/esprima.git#exportDefaultObject 414 verbose lock git://github.com/jgable/esprima.git#exportDefaultObject C:\Users\A510246\AppData\Roaming\npm-cache\3cc93090--esprima-git-exportDefaultObject.lock 415 verbose addRemoteGit [ 'git://github.com/jgable/esprima.git', 'exportDefaultObject' ] 416 silly gunzTarPerm extractEntry compat/internals/iteratorTemplate.js 417 silly gunzTarPerm modified mode [ 'compat/internals/iteratorTemplate.js', 438, 420 ] 418 silly gunzTarPerm extractEntry compat/internals/charAtCallback.js 419 silly gunzTarPerm modified mode [ 'compat/internals/charAtCallback.js', 438, 420 ] 420 silly gunzTarPerm extractEntry js/main/direct_resolve.js 421 silly gunzTarPerm modified mode [ 'js/main/direct_resolve.js', 438, 420 ] 422 silly gunzTarPerm extractEntry js/main/settle.js 423 silly gunzTarPerm modified mode [ 'js/main/settle.js', 438, 420 ] 424 silly gunzTarPerm extractEntry compat/internals/keyPrefix.js 425 silly gunzTarPerm modified mode [ 'compat/internals/keyPrefix.js', 438, 420 ] 426 silly gunzTarPerm extractEntry compat/internals/cachePush.js 427 silly gunzTarPerm modified mode [ 'compat/internals/cachePush.js', 438, 420 ] 428 silly gunzTarPerm extractEntry js/main/catch_filter.js 429 silly gunzTarPerm modified mode [ 'js/main/catch_filter.js', 438, 420 ] 430 silly gunzTarPerm extractEntry js/main/settled_promise_array.js 431 silly gunzTarPerm modified mode [ 'js/main/settled_promise_array.js', 438, 420 ] 432 silly gunzTarPerm extractEntry compat/internals/largeArraySize.js 433 silly gunzTarPerm modified mode [ 'compat/internals/largeArraySize.js', 438, 420 ] 434 silly gunzTarPerm extractEntry compat/internals/cacheIndexOf.js 435 silly gunzTarPerm modified mode [ 'compat/internals/cacheIndexOf.js', 438, 420 ] 436 silly gunzTarPerm extractEntry js/main/captured_trace.js 437 silly gunzTarPerm modified mode [ 'js/main/captured_trace.js', 438, 420 ] 438 silly gunzTarPerm extractEntry js/main/some.js 439 silly gunzTarPerm modified mode [ 'js/main/some.js', 438, 420 ] 440 silly gunzTarPerm extractEntry js/main/cancel.js 441 silly gunzTarPerm modified mode [ 'js/main/cancel.js', 438, 420 ] 442 silly gunzTarPerm extractEntry js/main/some_promise_array.js 443 silly gunzTarPerm modified mode [ 'js/main/some_promise_array.js', 438, 420 ] 444 silly gunzTarPerm extractEntry compat/internals/lodashWrapper.js 445 silly gunzTarPerm modified mode [ 'compat/internals/lodashWrapper.js', 438, 420 ] 446 silly gunzTarPerm extractEntry compat/internals/baseUniq.js 447 silly gunzTarPerm modified mode [ 'compat/internals/baseUniq.js', 438, 420 ] 448 silly lockFile d221af32-it-github-com-jgable-esprima-git git://github.com/jgable/esprima.git 449 verbose about to build C:\eak\node_modules\grunt-es6-import-validate\node_modules\es6-import-validate 450 info C:\eak\node_modules\grunt-es6-import-validate\node_modules\es6-import-validate unbuild 451 info preuninstall es6-import-validate@0.0.8 452 info uninstall es6-import-validate@0.0.8 453 verbose false,C:\eak\node_modules,C:\eak\node_modules\grunt-es6-import-validate\node_modules unbuild es6-import-validate@0.0.8 454 info postuninstall es6-import-validate@0.0.8 455 silly gunzTarPerm extractEntry compat/internals/maxPoolSize.js 456 silly gunzTarPerm modified mode [ 'compat/internals/maxPoolSize.js', 438, 420 ] 457 silly gunzTarPerm extractEntry compat/internals/baseRandom.js 458 silly gunzTarPerm modified mode [ 'compat/internals/baseRandom.js', 438, 420 ] 459 silly gunzTarPerm extractEntry js/main/call_get.js 460 silly gunzTarPerm modified mode [ 'js/main/call_get.js', 438, 420 ] 461 silly gunzTarPerm extractEntry js/main/synchronous_inspection.js 462 silly gunzTarPerm modified mode [ 'js/main/synchronous_inspection.js', 438, 420 ] 463 silly gunzTarPerm extractEntry compat/internals/objectPool.js 464 silly gunzTarPerm modified mode [ 'compat/internals/objectPool.js', 438, 420 ] 465 silly gunzTarPerm extractEntry compat/internals/baseMerge.js 466 silly gunzTarPerm modified mode [ 'compat/internals/baseMerge.js', 438, 420 ] 467 silly gunzTarPerm extractEntry js/main/bluebird.js 468 silly gunzTarPerm modified mode [ 'js/main/bluebird.js', 438, 420 ] 469 silly gunzTarPerm extractEntry js/main/thenables.js 470 silly gunzTarPerm modified mode [ 'js/main/thenables.js', 438, 420 ] 471 silly gunzTarPerm extractEntry compat/internals/objectTypes.js 472 silly gunzTarPerm modified mode [ 'compat/internals/objectTypes.js', 438, 420 ] 473 silly gunzTarPerm extractEntry compat/internals/baseIsEqual.js 474 silly gunzTarPerm modified mode [ 'compat/internals/baseIsEqual.js', 438, 420 ] 475 silly gunzTarPerm extractEntry js/main/async.js 476 silly gunzTarPerm modified mode [ 'js/main/async.js', 438, 420 ] 477 silly gunzTarPerm extractEntry js/main/timers.js 478 silly gunzTarPerm modified mode [ 'js/main/timers.js', 438, 420 ] 479 verbose about to build C:\eak\node_modules\grunt-es6-import-validate 480 info C:\eak\node_modules\grunt-es6-import-validate unbuild 481 info preuninstall grunt-es6-import-validate@0.0.6 482 info uninstall grunt-es6-import-validate@0.0.6 483 silly gunzTarPerm extractEntry js/main/assert.js 484 silly gunzTarPerm modified mode [ 'js/main/assert.js', 438, 420 ] 485 silly gunzTarPerm extractEntry js/main/util.js 486 silly gunzTarPerm modified mode [ 'js/main/util.js', 438, 420 ] 487 silly gunzTarPerm extractEntry compat/internals/reEscapedHtml.js 488 silly gunzTarPerm modified mode [ 'compat/internals/reEscapedHtml.js', 438, 420 ] 489 silly gunzTarPerm extractEntry compat/internals/baseIndexOf.js 490 silly gunzTarPerm modified mode [ 'compat/internals/baseIndexOf.js', 438, 420 ] 491 verbose true,C:\eak\node_modules,C:\eak\node_modules unbuild grunt-es6-import-validate@0.0.6 492 info postuninstall grunt-es6-import-validate@0.0.6 493 silly gunzTarPerm extractEntry compat/internals/reInterpolate.js 494 silly gunzTarPerm modified mode [ 'compat/internals/reInterpolate.js', 438, 420 ] 495 silly gunzTarPerm extractEntry compat/internals/baseFlatten.js 496 silly gunzTarPerm modified mode [ 'compat/internals/baseFlatten.js', 438, 420 ] 497 silly gunzTarPerm extractEntry js/main/promise.js 498 silly gunzTarPerm modified mode [ 'js/main/promise.js', 438, 420 ] 499 silly gunzTarPerm extractEntry js/zalgo/any.js 500 silly gunzTarPerm modified mode [ 'js/zalgo/any.js', 438, 420 ] 501 silly gunzTarPerm extractEntry compat/internals/releaseArray.js 502 silly gunzTarPerm modified mode [ 'compat/internals/releaseArray.js', 438, 420 ] 503 silly gunzTarPerm extractEntry compat/internals/baseEach.js 504 silly gunzTarPerm modified mode [ 'compat/internals/baseEach.js', 438, 420 ] 505 silly gunzTarPerm extractEntry js/zalgo/map.js 506 silly gunzTarPerm modified mode [ 'js/zalgo/map.js', 438, 420 ] 507 silly gunzTarPerm extractEntry js/zalgo/nodeify.js 508 silly gunzTarPerm modified mode [ 'js/zalgo/nodeify.js', 438, 420 ] 509 error Error: ENOENT, lstat 'C:\eak\node_modules\grunt-es6-import-validate\node_modules\lodash-node\compat\internals\createWrapper.js' 510 error If you need help, you may report this entire log, 510 error including the npm and node versions, at: 510 error http://github.com/isaacs/npm/issues 511 error System Windows_NT 6.1.7601 512 error command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" 513 error cwd C:\eak 514 error node -v v0.10.24 515 error npm -v 1.3.21 516 error path C:\eak\node_modules\grunt-es6-import-validate\node_modules\lodash-node\compat\internals\createWrapper.js 517 error fstream_path C:\eak\node_modules\grunt-es6-import-validate\node_modules\lodash-node\compat\internals\createWrapper.js 518 error fstream_type File 519 error fstream_class FileWriter 520 error code ENOENT 521 error errno 34 522 error fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26 522 error fstream_stack Object.oncomplete (fs.js:107:15) 523 verbose exit [ 34, true ]

jgable commented 10 years ago

Seems like you may be running into a weird windows permissions issue that is not related to this module.

According to this question/answer about npm errors you might want to try

npm install --no-bin-links

If it consistently fails at the same place, you can file an issue with lodash-node.

Shreejan commented 10 years ago

It's frustrating as I have already spent two days trying to fix it. And this is just to make simplest of ember app kit to run. Either I'm doing something horribly wrong or the whole module system is not yet evolved to address win 7 mumbo jumbo. I switched to mac and everything went smoothly and I was able to setup in less than 10 mins.