Doesn't run on windows
Closed this issue · 6 comments
The file dev-env/util/remove.js has some utility functions for building paths. However it assumes the directory separator is a "/", when on windows it is a "".
I think it can use something like path.sep
@jokerslab This should fix that 6085389
Give me report
This almost fixes everything. There was also a problem with the ability to set env variables using npm run-scripts on windows. better-npm-run and cross-env seem to solve that problem. I made a pull request that did basically the same thing and added the cross-env module.
@jokerslab I am not sure if I understand.
I add console.log("XXX", process.env.MY_ENV)
into dev-env/build.js
Then it prints XXX test
correctly when i run MY_ENV=test npm run build
Can you explain it better please?
When I try to run the script on windows it doesn't recognize the ability to set the environment and the command from the package.json file. See: http://stackoverflow.com/questions/9249830/how-can-i-set-node-env-production-in-windows
And this comment helped me solve the issue: http://stackoverflow.com/questions/25112510/how-to-set-environment-variables-from-within-package-json-node-js#comment57929242_27090755
`$ npm run dev
WebpackChromeExtension@0.3.1 dev C:\repos\webpack-chrome-extension
NODE_ENV=development ./node_modules/.bin/babel-node ./dev-env/dev.js
'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev"
`
This is working on Ubuntu, issues with Windows!! Cloned / npm install. Can't run.