Closed wbern closed 3 years ago
I have the same issue when running tests that use yeoman-test. The tests run locally (Windows and Linux), but fail in the Jenkins pipeline.
This issue is stale because it has been open with no activity. Remove stale label or comment or this will be closed
This is still an issue.
I think the issue is somehow related to the generator namespace. I fixed it by explicitly defining a namespace for the generator I was trying to test:
helpers.run( require( 'generators/app' ), { resolved: path.join( __dirname, 'generators/app' ), namespace: '@my/custom-generator:app' })
In addition I was using a sub-generator in the same project. The sub-generator didn't have the generator-
prefix which wasn't an issue with version 2 of yeoman-environment. However, version 3 seems to require that all generator names start with the generator-
prefix to be able to correctly resolve them.
This issue is stale because it has been open with no activity. Remove stale label or comment or this will be closed
@breglerj we were having the exact same issue with Jenkins, and your suggestion resolved it. Thank you!
├─ yeoman-assert@3.1.1
├─ yeoman-environment@3.9.1
├─ yeoman-generator@5.6.1
└─ yeoman-test@6.3.0
└─ mocha@10.0.0
Running Jenkins 2.366
Hey!
It seems like when I do
helpers.run(...)
, the process simply hangs and never starts any generators.When I revert to 2.10.3, it works.
It's really hard for me to reproduce this because I have no issues running locally. Jenkins CI is running node 14.15.4, same as what I have locally.
Jenkins is also running in a docker container.