{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/10575","labels_url":"https://api.github.com/repos/npm/npm/issues/10575/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/10575/comments","events_url":"https://api.github.com/repos/npm/npm/issues/10575/events","html_url":"https://github.com/npm/npm/issues/10575","id":119103657,"number":10575,"title":"Fixing npm on Windows","user":{"login":"dukedougal","id":691840,"avatar_url":"https://avatars.githubusercontent.com/u/691840?v=3","gravatar_id":"","url":"https://api.github.com/users/dukedougal","html_url":"https://github.com/dukedougal","followers_url":"https://api.github.com/users/dukedougal/followers","following_url":"https://api.github.com/users/dukedougal/following{/other_user}","gists_url":"https://api.github.com/users/dukedougal/gists{/gist_id}","starred_url":"https://api.github.com/users/dukedougal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dukedougal/subscriptions","organizations_url":"https://api.github.com/users/dukedougal/orgs","repos_url":"https://api.github.com/users/dukedougal/repos","events_url":"https://api.github.com/users/dukedougal/events{/privacy}","received_events_url":"https://api.github.com/users/dukedougal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/npm/npm/labels/feature-request","name":"feature-request","color":"ACE1AF"},{"url":"https://api.github.com/repos/npm/npm/labels/windows","name":"windows","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-26T21:30:49Z","updated_at":"2015-12-09T21:19:48Z","closed_at":null,"body":"Many npm packages don't run on Windows because they contain commands that are prefixed with environment variables.  Unfortunately this approach is not cross platform, so those commands fail on Windows.\r\n\r\nThe only practical solution I can think of for this is that npm detects when environment variables are being set and transforms the set command such that it is compatible with the operating system environment that it is running on.\r\n\r\nHere's an example of the problem:\r\n\r\n```json\r\n\"scripts\": {\r\n    \"test\": \"NODE_ENV=test mocha --compilers js:babel/register --recursive --require ./test/setup.js $(find test -name '*.spec.js')\",\r\n    \"test-watch\": \"npm test -- --watch\",\r\n    \"test-e2e:crdv\": \"chromedriver\",\r\n    \"test-e2e\": \"NODE_ENV=test mocha --compilers js:babel/register --require ./test/setup.js --require co-mocha ./test/e2e.js\",\r\n    \"lint\": \"eslint .\",\r\n    \"hot-server\": \"node server.js\",\r\n    \"build\": \"NODE_ENV=production webpack --config webpack.config.production.js --progress --profile --colors\",\r\n    \"start\": \"electron .\",\r\n    \"start-hot\": \"HOT=1 NODE_ENV=development electron .\",\r\n    \"package\": \"NODE_ENV=production node package.js\",\r\n    \"package-all\": \"npm run package -- --all\"\r\n  }\r\n```"},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/163394858","html_url":"https://github.com/npm/npm/issues/10575#issuecomment-163394858","issue_url":"https://api.github.com/repos/npm/npm/issues/10575","id":163394858,"user":{"login":"sheerun","id":292365,"avatar_url":"https://avatars.githubusercontent.com/u/292365?v=3","gravatar_id":"","url":"https://api.github.com/users/sheerun","html_url":"https://github.com/sheerun","followers_url":"https://api.github.com/users/sheerun/followers","following_url":"https://api.github.com/users/sheerun/following{/other_user}","gists_url":"https://api.github.com/users/sheerun/gists{/gist_id}","starred_url":"https://api.github.com/users/sheerun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheerun/subscriptions","organizations_url":"https://api.github.com/users/sheerun/orgs","repos_url":"https://api.github.com/users/sheerun/repos","events_url":"https://api.github.com/users/sheerun/events{/privacy}","received_events_url":"https://api.github.com/users/sheerun/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T21:19:48Z","updated_at":"2015-12-09T21:19:48Z","body":"I agree"}}