Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application not starting #26

Closed
prappo opened this issue Aug 20, 2016 · 3 comments
Closed

Application not starting #26

prappo opened this issue Aug 20, 2016 · 3 comments
Labels

Comments

@prappo
Copy link

prappo commented Aug 20, 2016

After creating project i tried this command
bozon start
but nothing happens . I'm using windows

@alchaplinsky
Copy link
Collaborator

alchaplinsky commented Aug 22, 2016

@prappo Which version of bozon are you using?

@lvdaqian
Copy link

lvdaqian commented Sep 6, 2016

I met the same issue. with windows 10 64bit. bozon version is 0.5.4.

@lvdaqian
Copy link

lvdaqian commented Sep 8, 2016

I have found the root cause for my case. There are two main issue in may case.

  1. NODE_PATH.
    When I run gulp directly, it report that can't find bozon/lib/building/tasks. But I have install the bozon globally. From http://stackoverflow.com/questions/9587665/nodejs-cannot-find-installed-module-on-windows, I set the NODE_PATH, it works when run gulp prepare:app --platform=windows --env=development directly.
  2. child_process.spawnSync may run the wrong command.
    In my node_module.bin, there is only gulp and gulp.cmd, electron and electron.cmd. no gulp.exe and electron.exe. I am not sure whether there is the exe files in other nodejs versions. From the issue of node: child_process.spawn ignores PATHEXT on Windows nodejs/node-v0.x-archive#2318 , node will automatically add .exe after the command. I try to add .cmd follow the command directly. script of bozon\lib\utiles\bozon.js like this:
  spawnSync: function (command, options) {
    return childProcess.spawnSync(command + ".cmd", options, {
      shell: true,
      stdio: 'inherit'
    })
  },

It works for me now. This only works for windows and will break other platform. There is a solution for cross-spawn https://github.com/IndigoUnited/node-cross-spawn. I think bozon should use this module instead of child_process.spawnSync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants