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

Error running yo hubot #115

Open
lukeasrodgers opened this issue Jul 14, 2024 · 1 comment
Open

Error running yo hubot #115

lukeasrodgers opened this issue Jul 14, 2024 · 1 comment

Comments

@lukeasrodgers
Copy link

I'm following the instructions here: https://hubot.github.com/docs/.

I have successfully run npm install -g yo generator-hubot.

$ yo --version
5.0.0
$ npm -v
10.8.1
$ node -v
v22.3.0

Then I mkdir hubot && cd hubot, and run yo hubot and accept all defaults.

(node:76306) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
? My Owner hubot
? Bot name mybot
? Description A simple helpful robot for your Company
? Bot adapter shell
                     _____________________________
                    /                             \
   //\              |      Extracting input for    |
  ////\    _____    |   self-replication process   |
 //////\  /_____\   \                             /
 ======= |[^_/\_]|   /----------------------------
  |   | _|___@@__|__
  +===+/  ///     \_\
   | |_\ /// HUBOT/\\
   |___/\//      /  \\
         \      /   +---+
          \____/    |   |
           | //|    +===+
            \//      |xx|

✖ An error occured while running hubot:app#writing
Error hubot

Cannot read properties of null (reading 'fromBasePath')
➜  hubot

yo doctor checks out

➜  hubot yo doctor

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
✔ yo version

Everything looks all right!
➜  hubot

Seems like the same problem as this person: https://stackoverflow.com/questions/78616874/error-cannot-read-properties-of-null-reading-frombasepath-on-hubot-creating.

I think the problem is this line this.copyTemplate('scripts/', 'scripts/', null, this.props) from app/index.js, which appears to have been fixed in dd084f6. Seems like maybe just need to cut a new release of this package.

@joeyguerra
Copy link
Member

joeyguerra commented Jul 14, 2024

Yes, that should fix it. But I don't have permissions to update the invalid NPM_TOKEN in the CI environment variables so I can't publish a new version. Nor do I have permissions to update the site at hubot.github.com. I've updated the docs in the repo though.

I suggest using npx hubot to create new bots instead of yo hubot.

Btw, I'd love to hear how your using Hubot. Would you be willing to share your story?

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