Code Monkey home page Code Monkey logo

Comments (3)

alchaplinsky avatar alchaplinsky commented on July 29, 2024

@prappo Which version of bozon are you using?

from bozon.

lvdaqian avatar lvdaqian commented on July 29, 2024

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

from bozon.

lvdaqian avatar lvdaqian commented on July 29, 2024

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

from bozon.

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.