npm run build_browser fails on windows
Running "npm run build_browser" fails on windows.
npm run build_browser
> [email protected] build_browser c:\Dev\blockchain\eosjs
> npm run build && mkdir -p dist && browserify -o dist/eos.js -s Eos lib/index.js
> [email protected] build c:\Dev\blockchain\eosjs
> babel --copy-files src --out-dir lib
src\abi-cache.js -> lib\abi-cache.js
src\format.js -> lib\format.js
src\format.test.js -> lib\format.test.js
src\index.js -> lib\index.js
src\index.test.js -> lib\index.test.js
src\schema\index.js -> lib\schema\index.js
src\schema.test.js -> lib\schema.test.js
src\structs.js -> lib\structs.js
src\structs.test.js -> lib\structs.test.js
src\write-api.js -> lib\write-api.js
A subdirectory or file -p already exists.
Error occurred while processing: -p.
A subdirectory or file dist already exists.
Error occurred while processing: dist.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build_browser: `npm run build && mkdir -p dist && browserify -o dist/eos.js -s Eos lib/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build_browser script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\WarrickF\AppData\Roaming\npm-cache\_logs\2018-05-16T02_47_32_164Z-debug.log
If I just run this part of the statement it works fine.
browserify -o dist/eos.js -s Eos lib/index.js
So I think it's just the "mkdir -p dist" portion of this statement that does not work as expected.
NPM has a shell we could use in devDependencies ..
I think this should possibly fall to the developer to add support to their local environment for such things.
Simply installing Git Bash or some other mingw64 console on windows and adding it to the system's environment would solve this, and would keep the eosjs package with a singular purpose and bloat-less ( regardless of that import probably not making it into the lib in any case ).
Sure, I don't think it really matters how we get there, as long as it's clear in the instructions.
I used cygwin until I dropped windows (along with the corporate job that came with it). Another good work-around is an open-source operating system..
I have other enhancements to add before this one though.. @nsjames devDependencies do not go into deployment. Also, looks like they don't install when using the npm package as a dependency in another project..