Comments (6)
@yankun01 - check out cross-var
- it should do what you want.
The README for cross-env
now has docs on how to use it.
from cross-env.
Ah, hmmm... I hadn't considered this use case... I'm not certain that I want to support this use case either. Seems a bit outside of the scope of cross-env
. But I'd be open to looking at a pull request to see what it would take to support this.
from cross-env.
Thanks Kent.
from cross-env.
I'm wondering if this is what is causing the following error for me using electron-react-boilerplate's default install and npm run dev
. It kicks off concurrent to run a few processes, each using cross-env:
C:\development\electron-react-boilerplate>npm run dev
> [email protected] dev C:\development\electron-react-boilerplate
> npm run hot-server -- --start-hot
> [email protected] hot-server C:\development\electron-react-boilerplate
> cross-env NODE_ENV=development node --max_old_space_size=2096 -r babel-register server.js "--start-hot"
Listening at http://localhost:3000
> [email protected] start-hot C:\development\electron-react-boilerplate
> cross-env HOT=1 NODE_ENV=development electron -r babel-register -r babel-polyfill ./app/main.development
fs.js:640
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open 'C:\development\electron-react-boilerplate\node_modules\electron\path.txt'
at Error (native)
at Object.fs.openSync (fs.js:640:18)
at Object.fs.readFileSync (fs.js:508:33)
at Object.<anonymous> (C:\development\electron-react-boilerplate\node_modules\electron\index.js:4:42)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\Nodist\\v-x64\\6.9.1\\node.exe" "C:\\Program Files (x86)\\Nodist\\npmv\\3.10.9\\bin\\npm-cli.js" "run" "start-hot"
npm ERR! node v6.9.1
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start-hot: `cross-env HOT=1 NODE_ENV=development electron -r babel-register -r babel-polyfill ./app/main.development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start-hot script 'cross
-env HOT=1 NODE_ENV=development electron -r babel-register -r babel-polyfill ./app/main.development'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-react-boiler
plate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env HOT=1 NODE_ENV=development electron -r babel-register -r babel-polyfill ./app/main.development
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron-react-boilerplate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron-react-boilerplate
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\development\electron-react-boilerplate\npm-debug.log
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\Nodist\\v-x64\\6.9.1\\node.exe" "C:\\Pro
gram Files (x86)\\Nodist\\npmv\\3.10.9\\bin\\npm-cli.js" "run" "hot-server" "--"
"--start-hot"
npm ERR! node v6.9.1
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] hot-server: `cross-env NODE_ENV=devel
opment node --max_old_space_size=2096 -r babel-register server.js "--start-hot"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] hot-server script 'cros
s-env NODE_ENV=development node --max_old_space_size=2096 -r babel-register serv
er.js "--start-hot"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-react-boiler
plate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env NODE_ENV=development node --max_old_space_size=2096 -r ba
bel-register server.js "--start-hot"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron-react-boilerplate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron-react-boilerplate
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\development\electron-react-boilerplate\npm-debug.log
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\Nodist\\v-x64\\6.9.1\\node.exe" "C:\\Pro
gram Files (x86)\\Nodist\\npmv\\3.10.9\\bin\\npm-cli.js" "run" "dev"
npm ERR! node v6.9.1
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dev: `npm run hot-server -- --start-h
ot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script 'npm run hot
-server -- --start-hot'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-react-boiler
plate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run hot-server -- --start-hot
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron-react-boilerplate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron-react-boilerplate
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\development\electron-react-boilerplate\npm-debug.log
from cross-env.
@mateodelnorte, that doesn't appear to be related to cross-env
at all. Probably something with electron or your own setup.
from cross-env.
Closing due to inactivity
from cross-env.
Related Issues (20)
- issue with nodejs in windows HOT 1
- PATH variable replacement on Windows envirement HOT 3
- No custom variable available without REACT_APP_ prefix HOT 1
- Passing url parameter on windows breaks HOT 1
- Processing variables on MacOS 10.15.2 only works with single quotes HOT 4
- cross-env should exit with non-zero code when terminated by Ctrl-C (SIGINT) HOT 5
- v7.0.1 leaves processes hanging on Windows HOT 1
- Cannot find module 'isexe' HOT 2
- Angular compilation problem HOT 1
- How to run cross-env from powershell in Windows? HOT 1
- Imports failing with "cannot locate symbol" error for wheels built on Ubuntu, deployed on aarch64 Android HOT 3
- More than 3 parent directories (..) in path ignored on Windows HOT 2
- Cross-env-shell in Windows via Npx doesn't handle multiple commands properly HOT 1
- Command causing cross-shell-env to fail silently HOT 2
- No cross-platform way of setting environment values containing spaces HOT 1
- cypress install no_proxy not working ? HOT 2
- Variables empty HOT 2
- The automated release is failing 🚨
- Fresh Laravel v8.12 install, node.js - TypeError: commandConvert is not a function HOT 1
- cross-env is "finished" (now in maintenance mode) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cross-env.