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

Cannot run command successfully. Cannot read Property 'value' of undefined #83

Closed
neekers opened this issue Jun 3, 2016 · 11 comments
Closed

Comments

@neekers
Copy link

neekers commented Jun 3, 2016

Tried to run it "yo typings:beta", but it won't let me put in my github username and then it fails. Looks like it skips a couple prompts, this one and the organization.

readline.js:925
throw err;
^

TypeError: Cannot read property 'value' of undefined
at Prompt.getCurrentValue (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/inquirer/lib/prompts/list.js:121:51)
at tryCatcher (/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:63:31)
at InnerObserver.next (/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:5407:43)
at InnerObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:1762:31)
at InnerObserver.tryCatcher (/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:63:31)
at AutoDetachObserverPrototype.next (/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:5883:51)
at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:1762:31)
at Subject.Rx.Subject.addProperties.onNext (/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:5998:19)
at Subject.tryCatcher (/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:63:31)
at AutoDetachObserverPrototype.next (/usr/local/lib/node_modules/yo/node_modules/rx/dist/rx.js:5883:51)

Help appreciated!

Thanks

@unional
Copy link
Collaborator

unional commented Jun 3, 2016

It should asked you to update the template. I'll check.

In the meantime, you can run yo typings:beta --update-template to configure the template and then try again.

Saw the problem. Fix on the way

@neekers
Copy link
Author

neekers commented Jun 3, 2016

:)

@unional
Copy link
Collaborator

unional commented Jun 3, 2016

Fixed in 0.15.13

Thanks for the report

@unional unional closed this as completed Jun 3, 2016
@unional
Copy link
Collaborator

unional commented Jun 3, 2016

Let me know if you encounter any other problem or if you have some suggestions to share. 🌷

@neekers
Copy link
Author

neekers commented Jun 3, 2016

Here is my full output. Now with a new error. I still wasn't able to specify the same answers. Notice the repo organization is 'it@github.com:neekers' missing a g from 'git'.

Let's quickly setup the template...
? Your username on GitHub
To begin, I need to know a little bit about the source you are typings for.
? Where can I get it from? (Use arrow keys)
? Where can I get it from? NPM
? https://github.com//typed-* x2js
? npm install ? x2js
? https://github.com/x2js/typed-* (typed-) gathering info from npm...
? How can the package be used?
? How can the package be used? AMD Module, CommonJS Module, ES2015 Module
? Your test framework of choice (Use arrow keys)
? Where can the package be used? Browser, Native NodeJS
? Your browser test harness (Use arrow keys)
❯ tape-run + jspm
Good, now about the typings itself...
Based on your configured template, ...
repository: it@github.com:neekers/x2js-typing
Github username: undefined
license: MIT
license signature: undefined
test framework: blue-tape
brower test harness: tape-run+jspm
? Your browser test harness tape-run + jspm
? Which license do you want to use? (Use arrow keys)
Apache 2.0
❯ MIT
Unlicense
FreeBSD
NewBSD
Internet Systems Consortium (ISC)
No License (Copyrighted)

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

ReferenceError: devPackage is not defined
at calcProperties (/usr/local/lib/node_modules/generator-typings/generators/beta/index.js:612:11)
at Object. (/usr/local/lib/node_modules/generator-typings/node_modules/yeoman-generator/lib/base.js:431:23)
at /usr/local/lib/node_modules/generator-typings/node_modules/run-async/index.js:26:25
at /usr/local/lib/node_modules/generator-typings/node_modules/run-async/index.js:25:19
at /usr/local/lib/node_modules/generator-typings/node_modules/yeoman-generator/lib/base.js:432:9
at processImmediate as _immediateCallback

@unional
Copy link
Collaborator

unional commented Jun 3, 2016

Sorry, just notice it through travis.
Fix is in 0.15.14 Published.

@unional
Copy link
Collaborator

unional commented Jun 3, 2016

This time the test passed.

In my local dev environment, I have the template already defined and have not have time to work on those test cases.

Sorry for the inconvenience.

@unional
Copy link
Collaborator

unional commented Jun 3, 2016

Fixing one more issue.

@unional
Copy link
Collaborator

unional commented Jun 3, 2016

@neekers Now it should be working. The issue you have was due to change in yeoman-generator@0.23 as it accepting promise for async code.

When I update to use it, the updateTemplate code was not updated properly.

@unional
Copy link
Collaborator

unional commented Jun 3, 2016

0.15.15 should be working for you.

@unional
Copy link
Collaborator

unional commented Jun 3, 2016

It should look something like this:

Welcome to the beta! Let me know if my questions make sense to you.
Now, let's get started...


     _-----_
    |       |    .--------------------------.
    |--(o)--|    |      Welcome to the      |
   `---------´   |    sensational typings   |
    ( _´U`_ )    |        generator!        |
    /___A___\    '--------------------------'
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

Seems like this is the first time you use this generator.
Let's quickly setup the template...
? Your username on GitHub unional
? https://github.com/<organization>/typed-* unional
? https://github.com/unional/typed-* typed-
? Your test framework of choice blue-tape
? Your browser test harness tape-run + jspm
? Which license do you want to use? MIT
? Your signature in the license: Copyright (c) 2016 <signature> unional
Got it! The template is saved.

I'll be creating the typings repository under the current folder

To begin, I need to know a little bit about the source you are typings for.
? Where can I get it from? NPM
? npm install <package name>? nop
gathering info from npm...
? How can the package be used? (Press <space> to select)CommonJS Module
? Where can the package be used? (Press <space> to select)Native NodeJS

Good, now about the typings itself...
Based on your configured template, ...
repository: typings/x
Github username: unional
license: MIT
license signature: unional
test framework: blue-tape
? Does it look good to you? Yes

Overal props for debug purpose:

{ repositoryName: 'x',
  repositoryOrganization: 'typings',
  username: 'unional',
  name: 'Homa Wong',
  email: 'homawong@gmail.com',
  sourceDeliveryType: 'npm',
  sourceDeliveryPackageName: 'nop',
  sourceUsages: [ 'commonjs' ],
  sourceMain: 'index',
  sourceVersion: '1.0.0',
  sourceHomepage: 'https://github.com/supershabam/nop',
  sourceRepository: 'git://github.com/supershabam/nop',
  sourcePlatforms: [ 'node' ],
  usePresetValues: true,
  repositoryRemoteUrl: 'https://github.com/typings/x.git',
  license: 'MIT',
  licenseSignature: 'unional',
  testFramework: 'blue-tape',
  devDependencies:
   [ 'onchange',
     'typings',
     'ts-node',
     'tslint',
     'tslint-config-typings',
     'tap-spec',
     'blue-tape' ],
  typingsDevDependencies: [ 'registry:npm/blue-tape' ],
  typingsGlobalDevDependencies: [ 'registry:env/node' ] }
   create package.json
   create tsconfig.json
   create tslint.json
   create .editorconfig
   create .travis.yml
   create .gitignore
   create typings.json
   create README.md
   create index.d.ts
   create LICENSE
   create source-test/README.md
   create source-test/tsconfig.json
   create test/tsconfig.json
   create test/test.ts
Installing nop...

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

No branches or pull requests

2 participants