Giter Club home page Giter Club logo

Comments (6)

markwoon avatar markwoon commented on May 26, 2024 1

@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.

kentcdodds avatar kentcdodds commented on May 26, 2024

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.

yankun01 avatar yankun01 commented on May 26, 2024

Thanks Kent.

from cross-env.

mateodelnorte avatar mateodelnorte commented on May 26, 2024

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.

kentcdodds avatar kentcdodds commented on May 26, 2024

@mateodelnorte, that doesn't appear to be related to cross-env at all. Probably something with electron or your own setup.

from cross-env.

kentcdodds avatar kentcdodds commented on May 26, 2024

Closing due to inactivity

from cross-env.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.