GithubHelp home page GithubHelp logo

Comments (8)

davelosert avatar davelosert commented on June 1, 2024

From the Docs of Inquirer:

Inquirer v9 and higher are native esm modules, this mean you cannot use the commonjs syntax require('inquirer') anymore. If you want to learn more about using native esm in Node, I'd recommend reading the following guide. Alternatively, you can rely on an older version until you're ready to upgrade your environment:
npm install --save inquirer@^8.0.0

Happy to set up a PR to do either, change this project to pure ESM (though that might cause follow up bugs) or rollback the inquirer Version to 8.x.x

from create-octokit-project.js.

timrogers avatar timrogers commented on June 1, 2024

Personally, I think I'd try a rollback (just to hopefully unblock you 🤞) and then we can figure out ESM separately.

from create-octokit-project.js.

davelosert avatar davelosert commented on June 1, 2024

I just tried this - unfortunately inquirer is not the only package but every dependency that is not @octokit:

  • camelcase
  • clipboardy
  • execa
  • inquirer
  • spdx-license-list

They are all by Sindre Sorhus who decided to push ESM forward by dropping all support on all his packages for CJS. This means: I can rollback all those packages, but they all will be pretty outdated then.

I guess the better way forward would be to try to port this library to ESM alltogether.

from create-octokit-project.js.

timrogers avatar timrogers commented on June 1, 2024

😓 I understand the reasons for pushing ESM, but these packages are a bit of a pain!

This "create project" command doesn't do anything super magical, so what do you think of doing what it does manually, and then we can make a note to fix this as a separate issue?

from create-octokit-project.js.

davelosert avatar davelosert commented on June 1, 2024

I already did 🙂 (see my PR over at: octokit/plugin-paginate-graphql.js#5).
I just went ahead and copied all the stuff I needed from the rest-pagination repository.

from create-octokit-project.js.

gr2m avatar gr2m commented on June 1, 2024

I just ran npm init octokit-project and it didn't throw the error for me

Did you see the issue right away or at a later step?

from create-octokit-project.js.

gr2m avatar gr2m commented on June 1, 2024

I guess the better way forward would be to try to port this library to ESM alltogether.

Yes I agree.

Also we should add actual tests :D A simple node create-octokit-project.js would have caught the error. I'm looking into it, because npm init octokit-project is a killer time saver if you create octokit plugins, and results in much better repositories

from create-octokit-project.js.

github-actions avatar github-actions commented on June 1, 2024

🎉 This issue has been resolved in version 2.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

from create-octokit-project.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.