Coder Social home page Coder Social logo

Comments (21)

RickWong avatar RickWong commented on September 23, 2024

I'm not sure if the npm run watch script is Windows-compatible. Do you know whether Windows supports eval and pid-capturing?

from react-isomorphic-starterkit.

Adeher avatar Adeher commented on September 23, 2024

same error on windows, no idea how to help you though

from react-isomorphic-starterkit.

AbrahamAlcaina avatar AbrahamAlcaina commented on September 23, 2024

In windows you need to use tasklist, taskkill

from react-isomorphic-starterkit.

RickWong avatar RickWong commented on September 23, 2024

βœ… For the time-being you can run these commands in 3 separate terminals:

  • npm run watch-server
  • npm run watch-client
  • supervisor dist/server

But Windows-support surely is something to look at.

from react-isomorphic-starterkit.

AbrahamAlcaina avatar AbrahamAlcaina commented on September 23, 2024
  • npm run watch-server
  • npm run watch-client
  • supervisor dist/server
    It is valid workarround πŸ‘

from react-isomorphic-starterkit.

RickWong avatar RickWong commented on September 23, 2024

See: cb0a4c6

Instead of the command-line eval + PID-magic the starterkit now uses concurrent(ly). Can someone test this on his Windows-machine? Let me know if it works!

from react-isomorphic-starterkit.

Semigradsky avatar Semigradsky commented on September 23, 2024

On Windows 8:

D:\Dev\git\react-isomorphic-starterkit>npm run watch

> [email protected] watch D:\Dev\git\react-isomorphic-starterkit

> concurrent --kill-others 'npm run watch-client' 'npm run watch-server' 'npm ru
n start'

Error occured when executing command: start'
Error: spawn 'npm ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
Error occured when executing command: start'
Error: spawn run ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
Error occured when executing command: start'
Error: spawn watch-client' ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
Error occured when executing command: start'
Error: spawn 'npm ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
Error occured when executing command: start'
Error: spawn run ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
Error occured when executing command: start'
Error: spawn watch-server' ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
Error occured when executing command: start'
Error: spawn 'npm ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
Error occured when executing command: start'
Error: spawn run ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
Error occured when executing command: start'
Error: spawn start' ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
[8] start' exited with code -4058

npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (
x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] watch: `concurrent --kill-others 'npm
 run watch-client' 'npm run watch-server' 'npm run start'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] watch script 'concurren
t --kill-others 'npm run watch-client' 'npm run watch-server' 'npm run start''.
npm ERR! This is most likely a problem with the react-isomorphic-starterkit pack
age,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     concurrent --kill-others 'npm run watch-client' 'npm run watch-serv
er' 'npm run start'
npm ERR! You can get their info via:
npm ERR!     npm owner ls react-isomorphic-starterkit
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\Dev\git\react-isomorphic-starterkit\npm-debug.log

from react-isomorphic-starterkit.

Semigradsky avatar Semigradsky commented on September 23, 2024

This works if a little rewrite:

    "watch": "concurrent --kill-others \"npm.cmd run watch-client\" \"npm.cmd run watch-server\" \"npm.cmd run start\""

But it looks like commands sleep and open aren't on Windows.

from react-isomorphic-starterkit.

paOol avatar paOol commented on September 23, 2024

also on Win8

C:\repository\react-isomorphic-starterkit>npm run watch

> [email protected] watch C:\repository\react-isomorphic-starter
kit
> concurrent --kill-others 'npm run watch-client' 'npm run browser'

Error occured when executing command: browser'
Error: spawn 'npm ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
Error occured when executing command: browser'
Error: spawn run ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
Error occured when executing command: browser'
Error: spawn watch-client' ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
Error occured when executing command: browser'
Error: spawn 'npm ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
Error occured when executing command: browser'
Error: spawn run ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
Error occured when executing command: browser'
Error: spawn browser' ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
[5] browser' exited with code -4058

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch"
npm ERR! node v0.11.15
npm ERR! npm  v2.1.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] watch: `concurrent --kill-others 'npm
 run watch-client' 'npm run browser'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] watch script.
npm ERR! This is most likely a problem with the react-isomorphic-starterkit pack
age,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     concurrent --kill-others 'npm run watch-client' 'npm run browser'
npm ERR! You can get their info via:
npm ERR!     npm owner ls react-isomorphic-starterkit
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\repository\react-isomorphic-starterkit\npm-debug.log

from react-isomorphic-starterkit.

Semigradsky avatar Semigradsky commented on September 23, 2024

@RickWong
Maybe move from bash script to gulp?

from react-isomorphic-starterkit.

RickWong avatar RickWong commented on September 23, 2024

I use Gulp for other projects and I think it's a great tool, though I rather not complicate the starterkit's build system and also not add more dependencies than necessary. The only platform incompatibilities are with sleep and open. I'll look into removing those two commands from the npm scripts.

from react-isomorphic-starterkit.

RickWong avatar RickWong commented on September 23, 2024

Release 2.4.0 should run without sleep and open.

from react-isomorphic-starterkit.

Semigradsky avatar Semigradsky commented on September 23, 2024

@RickWong
Still not working on Windows. Please reopen this.

For example:
npm run start

> NODE_PATH="./src" node ./babel.server

'NODE_PATH' is not recognized as an internal or external command,
operable program or batch file.

And this (#1 (comment)) still reproduce.

from react-isomorphic-starterkit.

RickWong avatar RickWong commented on September 23, 2024

@Semigradsky Can you try this and see if it works? set NODE_PATH="./src"; node ./babel.server

from react-isomorphic-starterkit.

Semigradsky avatar Semigradsky commented on September 23, 2024

set NODE_PATH="./src"; node ./babel.server not working
set NODE_PATH="./src" && node ./babel.server running, but new errors:

[piping] can't execute file: D:\Dev\git\react-isomorphic-starterkit\babel.server
.js
[piping] error given was: Error: Cannot find module 'views/Routes'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.module._load (D:\Dev\git\react-isomorphic-starterkit\node_module
s\piping\lib\launcher.js:24:23)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (D:/Dev/git/react-isomorphic-starterkit/src/server.js:
4:38)
    at Module._compile (module.js:460:26)
    at normalLoader (D:\Dev\git\react-isomorphic-starterkit\node_modules\babel-c
ore\lib\babel\api\register\node.js:147:5)
    at Object.require.extensions.(anonymous function) [as .js] (D:\Dev\git\react
-isomorphic-starterkit\node_modules\babel-core\lib\babel\api\register\node.js:16
0:7)
    at Module.load (module.js:355:32)
    at Module._load (module.js:310:12)
[piping] further repeats of this error will be suppressed...

from react-isomorphic-starterkit.

RickWong avatar RickWong commented on September 23, 2024

Related gist: https://gist.github.com/branneman/8048520

from react-isomorphic-starterkit.

Semigradsky avatar Semigradsky commented on September 23, 2024

Windows: cmd.exe /C "set NODE_PATH=.&& node app"
(On Windows this command will not work if you put a space in between the path and the &&. Crazy shit.)

πŸ’©

set NODE_PATH=./src&& node ./babel.server working

==> ?  Server is listening
==> ?  Go to http://semigradskyd:8000

from react-isomorphic-starterkit.

Semigradsky avatar Semigradsky commented on September 23, 2024

It seems that this PR it will be fix npm run watch issue.

from react-isomorphic-starterkit.

paOol avatar paOol commented on September 23, 2024

my scripts section of package json looks like this now


  "scripts": {
    "start": "set NODE_PATH=./src&& node ./babel.server",
    "build": "node ./node_modules/webpack/bin/webpack.js --verbose --colors --display-error-details --config webpack.client.js",
    "watch-client": "node ./node_modules/webpack/bin/webpack.js --verbose --colors --display-error-details --config webpack.client-watch.js && node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack.client-watch.js",
    "watch": "node ./node_modules/concurrently/src/main.js --kill-others 'npm run watch-client' 'npm run start'"
  },

npm run start works, but the others still give me that ENOENT error.
can someone post a working package.json?

from react-isomorphic-starterkit.

RickWong avatar RickWong commented on September 23, 2024

The NODE_PATH issue can be solved with #38

from react-isomorphic-starterkit.

Semigradsky avatar Semigradsky commented on September 23, 2024

It remains to solve the NODE_PATH issue.

from react-isomorphic-starterkit.

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.