I've inherited a project that does its build using NodeJS. Everything's been working fine for us for months. We've built a number of production releases with no problem.
Enter xlsx.js.
Since adding this package as a dependency, we've found that our Gulp build works on Windows but not on Ubuntu (which is our build machine). When we do the build on Ubuntu, RequireJS barfs on require('fs'):
johnny@ubun-16:~/dev/eVGM-JavaScript-Client$ node --version
v4.6.1
johnny@ubun-16:~/dev/eVGM-JavaScript-Client$ gulp test
[15:19:35] Using gulpfile ~/dev/eVGM-JavaScript-Client/gulpfile.js
[15:19:35] Starting 'test'...
[15:19:35] Starting 'run-tests'...
07 11 2016 15:19:40.236:WARN [karma]: No captured browser, open http://localhost:9876/
07 11 2016 15:19:40.298:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
07 11 2016 15:19:40.308:INFO [launcher]: Starting browser PhantomJS
07 11 2016 15:19:41.421:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket Hq69p1CiIhcsCDOGAAAA with id 72071968
07 11 2016 15:19:41.596:WARN [web-server]: 404: /base/jspm_packages/system-polyfills.js
07 11 2016 15:19:43.457:WARN [web-server]: 404: /base/fs.js
PhantomJS 2.1.1 (Linux 0.0.0) ERROR
Error: (SystemJS) XHR error (404 Not Found) loading /home/johnny/dev/eVGM-JavaScript-Client/fs.js
Error loading /home/johnny/dev/eVGM-JavaScript-Client/fs.js as "fs" from /home/johnny/dev/eVGM-JavaScript-Client/jspm_packages/github/sheetjs/js-xlsx@0.8.0/xlsx.js
PhantomJS 2.1.1 (Linux 0.0.0): Executed 0 of 0 ERROR (2.27 secs / 0 secs)
From what I can tell, 'fs' is a built-in package for NodeJS. (right?) And it should be there. Yet it's not according to Gulp.
To make matters even weirder, if I type Node and at the Node prompt, type "require('fs')", I get the flood of text that tells me that Node is finding the package A-OK.
Maybe it's a Gulp issue. Maybe it's a Ubuntu issue. Maybe it's a Jeff's-an-idiot issue. For whatever reason, I can not get our build to find fs from Gulp, and only on Ubuntu.
Any help very, very gratefully received ...
Thanks, Jeff