0

I am building a custom Yeoman generator. When I run it the project is created as expected but an error is thrown. This is the stacktrace:

events.js:183
  throw er; // Unhandled 'error' event
  ^

Error: spawn EACCES
    at _errnoException (util.js:1022:11)
    at ChildProcess.spawn (internal/child_process.js:323:11)
    at Object.exports.spawn (child_process.js:502:9)
    at spawn (/home/alvarobc/Repositories/geoffrey-project-generator/node_modules/cross-spawn/index.js:12:24)
    at module.exports.spawnCommand.spawnCommand (/home/alvarobc/Repositories/geoffrey-project-generator/node_modules/yeoman-generator/lib/actions/spawn-command.js:20:10)
    at module.exports.install (/home/alvarobc/Repositories/geoffrey-project-generator/generators/app/index.js:118:10)
    at Object.<anonymous> (/home/alvarobc/Repositories/geoffrey-project-generator/node_modules/yeoman-generator/lib/index.js:399:25)
    at /home/alvarobc/Repositories/geoffrey-project-generator/node_modules/run-async/index.js:25:25
    at new Promise (<anonymous>)
    at /home/alvarobc/Repositories/geoffrey-project-generator/node_modules/run-async/index.js:24:19

The error seems to come from a Promise instantiation. I do not know how to approach this error in order to solve it. Since I intend to publish this generator I would like to know where this error come from.

npm --version
3.5.2

yo --version
2.0.5

Thanks in advance, any info about how to solve this error is would be appreciated.

alvaro
  • 452
  • 5
  • 13
  • 1
    Looks like permission issue in target directory where you are creating project. Its basically unable to create a new process. what steps you are doing in install() phase of yeoman generator – Saurabh Nemade Nov 14 '18 at 04:49
  • 1
    You were right @SaurabhNemade. I was running a gradlew build in the yeoman install phase and the gradlew script had no execution permissions. The project was generated but the build wasnt executing at all – alvaro Dec 14 '18 at 10:50

0 Answers0