steem-js icon indicating copy to clipboard operation
steem-js copied to clipboard

NPM run scripts fail when run on Windows

Open xtu opened this issue 7 years ago • 0 comments

Expected behavior

The code should build without problem and all tests pass when running the commands described in How to reproduce section on Windows platform

Actual behavior

npm run build-browser fails because of setting NODE_ENV environment variable. The syntax does not work on Windows.

npm run build-node fails because mkdir on Windows does not accept -p parameter.

npm test does not work because ; is not treated as command separator on Windows, thus -t 40000 parameter is passed to eslint which is an invalid parameter.

Note: npm install fails only when using npm@4 because it runs prepublish script which executes the build script. In npm@5, npm install does not execute prepublish.

How to reproduce

git clone https://github.com/steemit/steem-js.git
cd steem-jss
npm install
npm run build
npm test

Environment information

Windows 10 Home 64bit node: v8.9.4 npm: v5.6.0 GnuWin32 utilities are in my PATH so I can use gzip and du commands.

Before I upgrade npm to v5.6.0, I was using v4.x, I upgraded to the latest version after I noticed the issue with prepublish being executed by npm install.

xtu avatar Jan 08 '18 22:01 xtu