by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 12 05:03
    dependabot[bot] labeled #115
  • Aug 12 05:03
    dependabot[bot] labeled #115
  • Aug 12 05:03
    dependabot[bot] opened #115
  • Aug 12 05:03

    dependabot[bot] on npm_and_yarn

    Bump sinon from 9.0.2 to 9.0.3 … (compare)

  • Aug 11 13:48
    jorgecoca closed #1744
  • Aug 11 05:03
    dependabot[bot] labeled #114
  • Aug 11 05:03
    dependabot[bot] labeled #114
  • Aug 11 05:03
    dependabot[bot] opened #114
  • Aug 11 05:03

    dependabot[bot] on npm_and_yarn

    Bump xo from 0.32.1 to 0.33.0 … (compare)

  • Aug 10 12:43
    sindresorhus synchronize #72
  • Aug 09 00:16
    github-actions[bot] labeled #1253
  • Aug 08 19:19
    giulianok synchronize #72
  • Aug 08 19:16
    giulianok synchronize #72
  • Aug 08 19:06
    giulianok opened #72
  • Aug 07 19:01
    jorgecoca opened #1744
  • Aug 06 12:32
    UlisesGascon locked #1743
  • Aug 06 12:29
    UlisesGascon locked #1689
  • Aug 06 10:28
    guptar85 closed #1743
  • Aug 06 10:11
    guptar85 opened #1743
  • Aug 05 15:28
    Lynn14m closed #1742
Igor Dranichnikov
@abm0
Ok, adding a ./ in the beginning of the path string worked for me. :)
Marcelo Shima
@mshima
👍
Dan Gilleland
@dagilleland
Thanks @mshima !
Lasitha Denipitiya
@LasMD

Hello, there yeoman community, I'm trying to test my generator according to the examples given on yeoman unit testing guide but I received unexpected behavior when running the test which shouldn't happen.
here is my code (I'm using AVA as the test runner)

test.serial.beforeEach(t => {
  let prompts = {
    name: "dummyName",
    site: "dummySite",
    description: "dummyDesc",
  }
  runner =  yt.run(path.join(__dirname, "../generators/app"))
    .inDir("test-workspace")
    .withOptions({force: true})
    .withPrompts(prompts);
  return runner.toPromise();
});

test.afterEach.always(t => {
  runner.cleanTestDirectory();
});

so what I was expecting with the configuration is that yeoman-test will submit the stubbed prompts for the questions automatically and prepare the package.json it test-workspace directory.
instead of that the console output the first prompt question to be answered ...
? suggest a name for the application? (proj-alpha-rc-01)
and
the test ends with a × Timed out while running tests
what could cause this behavior ?

Marcelo Shima
@mshima
You shouldn’t set yeoman-test to a variable . It should be 1 line.
return .....toPromise()
Marcelo Shima
@mshima
Desconsider above
You should set prompt = {dummyName: 'foo'}
cleanTestDirectory should be done only with runner.cd. InDir and inTmpDir it’s done automatically.
Lasitha Denipitiya
@LasMD

Thank you @mshima for shedding some light to look inside the implementation code of code, then I understood that there is a nasty bug in my code.

instead of calling this.prompt(questions) in my custom generator's prompting runLoop event in generator API what I did was calling the prompt method directly on Inquirer API eventually recreating all again overwriting DummyPrompt.

And I think that it should be prompt = {name: "DummyName"} because at
yeoman-test#withPrompts it is extending this.answers object so the id of the entry should be the name given to each question which will be prompt.
Thank you for the direction.

nbogdan24
@nbogdan24
Hello guys! I'm running the command npm run build, but my app does not include all my libraries js in vendor.js! I don't know why! Can someone help me please!
Cre8tiveDigital
@Cre8tiveDigital
Hi I was wondering if someone could offer some help I am trying to exit yeoman if a prompt = no
Neelima Joshi
@neelima1993-1ap
HI! I am a newbie to react. I used generator-react-fullstack to create a basic react app. When I do npm start, which root html file is loaded? like when in used Facebook 'create react app' , it loads index.html from the public folder...
Siddharth
@SiddharthVarshney

I am installing Yeoman on my machine and ran this npm install -g yo This is giving me permission error:

npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/nvm/versions/node/v12.16.1/lib/node_modules/yo
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/nvm/versions/node/v12.16.1/lib/node_modules/yo'
npm ERR!  [Error: EACCES: permission denied, access '/usr/local/nvm/versions/node/v12.16.1/lib/node_modules/yo'] {
npm ERR!   stack: "Error: EACCES: permission denied, access '/usr/local/nvm/versions/node/v12.16.1/lib/node_modules/yo'",
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/nvm/versions/node/v12.16.1/lib/node_modules/yo'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/siddharth/.npm/_logs/2020-04-24T22_31_29_025Z-debug.log

But this got resolved by attaching sudo

Now I am getting this error:

Yeoman Doctor
Running sanity checks on your system

✔ No .bowerrc file in home directory
✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ No .yo-rc.json file in home directory
✔ Node.js version
✔ npm version
Error: Couldn't find the 'yo' binary. Make sure it's installed and in your $PATH
    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn yo',
  path: 'yo',
  spawnargs: [ '--version' ],
  cmd: 'yo --version'
}
✖ yo version
Error: Couldn't find the 'yo' binary. Make sure it's installed and in your $PATH
    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn yo',
  path: 'yo',
  spawnargs: [ '--version' ],
  cmd: 'yo --version'
}

Found potential issues on your machine :(
+ yo@3.1.1
updated 1 package in 29.492s

Running yo --version is giving zsh: command not found: yo I tried this https://stackoverflow.com/a/58277450/10309895 but this is also not working for me :,(

Siddharth
@SiddharthVarshney
is this community is still active?
Matthew Pirocchi
@mpiroc

I'm having some trouble using TypeScript with yeoman. My TypeScript source lives in ./generators/app, and is transpiled to ./out/generators/app. Because yeoman specifically looks for the "./generators" folder, it attempts to run the TypeScript file instead of the transpiled JavaScript file (which of course fails).

Is there any way to force yeoman to start the search at "./out" instead of "."?

I could move the typescript source to ./generator-ts, and transpile to ./generator. But that breaks convention with the rest of the packages in my project.
Marcelo Shima
@mshima
@mpiroc is this a regression?
Matthew Pirocchi
@mpiroc
@mshima Not sure, I just started using yeoman today :)
But I don't see why it would be--yeoman is behaving exactly as the docs say. It's just that this behavior is problematic with transpiled languages.
Marcelo Shima
@mshima
Maybe put the at ./lib instead of ./out.
Matthew Pirocchi
@mpiroc
Yeah I'm working around it by transpiling from ./generators-ts to ./generators, it's just gross to do it this way.
Matthew Pirocchi
@mpiroc
Is it a supported use-case to incorporate non-yeoman generators? I want to run rush init, which generates a bunch of files, then update those files from my yeoman generator. But rush init generates files into the real filesystem, not the in-memory filesystem.
My rationale is that if rush is updated to generate different content, my yeoman generator will pick up those changes for free.
Matthew Pirocchi
@mpiroc
hmmm I suppose I could run rush init in a temporary location, read each file and this.fs.write it into the in-memory system
Simon Boudrias
@SBoudrias
@mpiroc if you run rush init first, then the yeoman mem-fs won’t be filled with content. So when your generator starts to edit the files on the disk, it’ll read those written by rush. Not sure if that makes your use case easier or not.
2 replies
Devin Fee
@dfee
hi, i'm trying to install yeoman LOCALLY, and getting a warning that Unable to find the npm root, something went wrong. and then Found potential issues on your machine :(. is there a particular reason for this?
Marcelo Shima
@mshima
Devin Fee
@dfee
should i instead open an issue in yeoman/doctor?
Marcelo Shima
@mshima
👍
I thought it was an environment error because I am playing with rpm root on environment but it shouldn’t be used by default.
Just tested and indeed it’s not environment fault.
Devin Fee
@dfee
@mshima alright, i didn't know if yeoman didn't support local installs (for some weird reason).
Paul Bijan Coch
@paulbijacho_twitter
Heey everyone, if someone of you might be interested in a more visual approach of developing code with the help of reusable templates: I and my team have spent the last nine months with the development of https://app.generato.com/#/.
We wanted to have a visual approach to design projects,. write Templates in a text form and have the possibility to regenerate everything with the help of protected „own-code“ areas. We'd be so happy to get your feedback on this. Please try it out and hit me up on Intercom in the app itself, via email: paul.coch@generato.com, or simply right here. I'd love to hear what you have to say about it, what you like, what you don't like and how we can approve this to a better developer experience.
Lynn14m
@Lynn14m
Hey everyone! I created a Yeoman generator and used the steps on the ‘Discovering Generators’ page to get the generator to be added to the website. For the generator, instead of using the naming convention of generator-your-unique-name, I named it using a scoped package name convention (I looked through you GitHub repository and saw that you added scoped package name support in your v2.4.0 release). However, my generator still isn’t showing up on the Yeoman website. Is there anything special/extra that I need to do for Yeoman to pick up my generator?
Maxime ROBIN
@Waxo
hello everyone, I'm tryiong to figure out if I can use yeoman using only yarn and no NPM for developping and usage, is there any way to achieve that, i think i've reached the end of internet
Maxime ROBIN
@Waxo
nvm i'm stupid it works, i didn't named my files and folder properly my bad, read the docs is the good way
allacherkes
@allacherkes
Hi everyone. I have 'generator-a' which calls for 'generator-b' inside with command composeWith(). Now I want prompts of 'generator-b' to be displayed before prompts of 'generator-a'. Is it possible? What is the best way to achieve this? Thanks.
Minu Francis
@francisminu
Hi All
I am trying to incorporate yeoman in my oclif based CLI and I added the below lines as mentioned in the official documentation:
const env = createEnv()
env.register(require.resolve('../generators/component1'), oclif:component1);
//await super.generate('component1');
env.run('oclif:component1', (err: any, stdout: any, stderr: any) => {
console.log(err);
});
But I seem to be getting this error:
TypeError: Class extends value #<Object> is not a constructor or null
at Object.<anonymous> (C:/Project/SynapseModernization/2020/cli/src/generators/component1.ts:5:42)) 439:23)
at Module.m._compile (C:/Project/SynapseModernization/2020/cli/node_modules/ts-node/src/index.ts:cli/node_modules/ts-node/src/index.ts:442:12)439:23) -environment/lib/store.js:47:27)
at Object.require.extensions.(anonymous function) [as .ts] (C:/Project/SynapseModernization/2020/js:71:39)cli/node_modules/ts-node/src/index.ts:442:12)
at Object.get [as oclif:component1] (C:/Project/SynapseModernization/2020/cli/node_modules/yeoman-environment/lib/store.js:47:27)
at Store.get (C:/Project/SynapseModernization/2020/cli/node_modules/yeoman-environment/lib/store.js:71:39)
at Environment.get (C:/Project/SynapseModernization/2020/cli/node_modules/yeoman-environment/lib/environment.js:540:48)
at Environment.create (C:/Project/SynapseModernization/2020/cli/node_modules/yeoman-environment/lib/environment.js:613:37)
at instantiateAndRun (C:/Project/SynapseModernization/2020/cli/node_modules/yeoman-environment/lib/environment.js:729:30)
at Environment.run (C:/Project/SynapseModernization/2020/cli/node_modules/yeoman-environment/lib/environment.js:758:12)
at CsGenerator.run (C:/Project/SynapseModernization/2020/cli/src/commands/component1.ts:18:9)
at CsGenerator._run (C:/Project/SynapseModernization/2020/cli/node_modules/@oclif/command/lib/command.js:35:31)
Any inputs are greatly appreciated
Minu Francis
@francisminu
And it occurs at env.run call
Covarians
@Covarians
Hello,
I would like to know if there is a process to re-scaffold a project (generated with and old version of a generator) with the latest version of the same generator in order to benefit from its latest improvement and also the latest version of the dependencies ? Timpically I am using the yo-office-generator and it comes now with a leaner project structure and dist directory plus some other linter improvements.