Closed boeckMt closed 9 years ago
What version of slurp and was there any console output?
Hey sorry for the slow response. output from the console:
$ grunt slurp Running "esri_slurp:dev" (esri_slurp) task downloading and processing esri version 3.11 [==============================] 100% remaining: 0.0s elapsed: 66.4s Done, without errors.
Versions:
grunt: ~0.4.1 grunt-esri-slurp: 1.1.0 esri: 3.11
Checked the body in the task esri_slurp.js bevor writing to the file. The body is not empty but after the fs.writeFile there is still no content in the written file??
var _basename = path.basename(file); if(_basename === 'utils.js'){ if(file === 'arcgis/utils.js'){ console.log(body) } } fs.writeFile(newFile, body, 'binary');
try this with 1.2.0. I can't reproduce this.
I'm seeing the same issue on Windows (Node v0.10.28). I tried updating to slurp 1.2.0 as well, and still have an empty esri/arcgis/util
module.
However, previously, I had been able to use slurp 1.1.0 to download JSAPI 3.11 on my Mac, and the esri/arcgis/util
module is not empty. Same project, same Gruntfile config, only diff is OSX vs Windows environments.
grunt config:
esri_slurp: {
options: {
version: '3.11'
},
dev: {
options: {
beautify: true
},
dest: 'src/esri'
}
},
So, I tried setting beautify: false
and I see the file is not empty. @boeckMt, did you have beautify: true
?
what version of beautify do you have installed?
1.5.4
npm ls output for grunt-esri-slurp:
....
├─┬ grunt-esri-slurp@1.2.0
│ ├─┬ esrislurp@0.1.1
│ │ ├── async@0.9.0
│ │ ├─┬ handlebars@2.0.0
│ │ │ ├─┬ optimist@0.3.7
│ │ │ │ └── wordwrap@0.0.2
│ │ │ └─┬ uglify-js@2.3.6
│ │ │ ├── async@0.2.10
│ │ │ └─┬ source-map@0.1.40
│ │ │ └── amdefine@0.1.0
│ │ ├─┬ js-beautify@1.5.4
│ │ │ ├─┬ config-chain@1.1.8
│ │ │ │ ├── ini@1.3.2
│ │ │ │ └── proto-list@1.2.3
│ │ │ └─┬ nopt@3.0.1
│ │ │ └── abbrev@1.0.5
│ │ ├─┬ mkdirp@0.5.0
│ │ │ └── minimist@0.0.8
│ │ ├── string@2.2.0
│ │ └─┬ walk@2.3.4
│ │ └── foreachasync@3.0.0
│ ├── progress@1.1.8
│ ├─┬ request@2.51.0
│ │ ├── aws-sign2@0.5.0
│ │ ├─┬ bl@0.9.3
│ │ │ └─┬ readable-stream@1.0.33
│ │ │ ├── core-util-is@1.0.1
│ │ │ ├── inherits@2.0.1
│ │ │ ├── isarray@0.0.1
│ │ │ └── string_decoder@0.10.31
│ │ ├── caseless@0.8.0
│ │ ├─┬ combined-stream@0.0.7
│ │ │ └── delayed-stream@0.0.5
│ │ ├── forever-agent@0.5.2
│ │ ├─┬ form-data@0.2.0
│ │ │ ├── async@0.9.0
│ │ │ └─┬ mime-types@2.0.4
│ │ │ └── mime-db@1.3.0
│ │ ├─┬ hawk@1.1.1
│ │ │ ├── boom@0.4.2
│ │ │ ├── cryptiles@0.2.2
│ │ │ ├── hoek@0.9.1
│ │ │ └── sntp@0.2.4
│ │ ├─┬ http-signature@0.10.0
│ │ │ ├── asn1@0.1.11
│ │ │ ├── assert-plus@0.1.2
│ │ │ └── ctype@0.5.2
│ │ ├── json-stringify-safe@5.0.0
│ │ ├── mime-types@1.0.2
│ │ ├── node-uuid@1.4.2
│ │ ├── oauth-sign@0.5.0
│ │ ├── qs@2.3.3
│ │ ├── stringstream@0.0.4
│ │ ├─┬ tough-cookie@0.12.1
│ │ │ └── punycode@1.3.2
│ │ └── tunnel-agent@0.4.0
│ └── string@2.2.0
....
what happens if you run js-beautify on http://js.arcgis.com/3.11amd/esri/arcgis/utils.js? Is the output empty?
I am able to copy the contents of http://js.arcgis.com/3.11amd/esri/arcgis/utils.js to a local file and run js-beautify on it and pipe that output to another file. The contents of the output file are not empty - it looks valid.
All things are working on my home-pc: beautify is true and it's also win7
node v0.10.26 grunt-esri-slurp v1.1.0 esri: 3.11
It fails on my pc at work (win7) behind a corporate firewall, but if it's only the file esri/arcgis/utils.js this can't be the reason.
Maby it is on the step
fs.writeFile(newFile, body, 'binary')
because the log of the body before this step was not empty I will check the dependencies and the node version and let you know.
yeah i wonder if I should pass a callback there to see if there is an error and bubble that up. Prior I think that call was writeFileSync.
give this task an update and then give it a shot.
now i updated node from v0.10.30 to v0.10.33 and its working...
Ok i downloaded node v0.10.30 on my home-pc and it's not working. Seems it has something to do with node version v0.10.30
so we can blame it on node? We could bump https://github.com/steveoh/esrislurp/blob/master/package.json#L20 but I haven't noticed this with other versions of node. Maybe this issue will be google fu enough?
Blame it on Node? Sounds like a slow dance song from the 80's.
But yeah, I think we can. I was on v0.10.28 when I saw this issue, but just updated to v0.10.34 and it now works.
testing on .35 and it seems to be working.
I see this thread is a few months old but thought I'd chime in, since I just tracked down some intermittent failures deploying my app to an empty utils.js file. I'm running Jenkins on a Centos 7 VM and developing on a Fedora 21 laptop. Builds would complete in both environments without errors (including esri-slurp).
On the CI server, sometimes the app is failing to load properly with the same code that built and runs fine on my laptop. My laptop is using a v0.11.14-pre instance of node. The Jenkins build project is using a 0.10.32 instance of node and js-beautify v1.5.5. In some cases, I can get the app to work from the CI server build simply by having Jenkins rebuild and deploy the project--no changes in the code. The project is running esri-slurp every build though so my esri folder is changing with every build.
What's odd is that sometimes the build works and sometimes it doesn't. I have the server set to do nighly builds so I'll keep an eye on failures and see if the empty utils.js file is consistent between them. I'll also try upping the version of node on the CI server to see if that resolves the problem.
After running the command "grunt slurp" the file esri/arcgis/utils.js was empty but it's available on http://js.arcgis.com/3.11amd/esri/arcgis/utils.js