Coder Social home page Coder Social logo

Compatibility with yarn pnp? about renamer HOT 7 CLOSED

75lb avatar 75lb commented on September 28, 2024
Compatibility with yarn pnp?

from renamer.

Comments (7)

75lb avatar 75lb commented on September 28, 2024

Hi, i've pushed a fix for this in a beta release with the tag next - could you check it works please?

npm install renamer@next

I just need to test the prerelease on multiple platforms before making it live..

from renamer.

mxro avatar mxro commented on September 28, 2024

Thank you for looking into this so quickly 👍

I upgraded to renamer@next and now I'm getting this error:

internal/modules/cjs/loader.js:984
    throw new ERR_REQUIRE_ESM(filename);
    ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/mrohde/repos/typescript-monorepo-starter/.yarn/cache/renamer-npm-3.0.0-0-8784a2473a-3.zip/node_modules/renamer/bin/cli.mjs
    at Module.load (internal/modules/cjs/loader.js:984:11)
    at Function.module_1.Module._load (/Users/mrohde/repos/typescript-monorepo-starter/.pnp.js:23734:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'ERR_REQUIRE_ESM'

This is using yarn-2.0.0-rc.33.js with workspaces enabled. My node version is v12.18.0. Let me know if you need any more information.

from renamer.

75lb avatar 75lb commented on September 28, 2024

Ok, thanks for the detailed report.

I have rewritten renamer using ECMAScript Modules (which you just tested on the prerelease) but this version clearly needs some extra work..

So, I applied the fix for this issue on the main branch and released it in v2.0.1. The ESModules version can wait.

Please upgrade:

npm install renamer

from renamer.

mxro avatar mxro commented on September 28, 2024

Thank you for looking into this straight away 💯

I've upgraded to the latest version using yarn up renamer@^2.0.1.

The error message does not come up anymore.

Unfortunately, it seems to get stuck on applying:

renamer --find .d.ts --replace .ts \"./src/generated/**\"

Process can only be quit using Ctrl +C or similar means.

When changing back with yarn up renamer@^0.7.0 it works again. I'm on Mac OS 10.13.6.

from renamer.

75lb avatar 75lb commented on September 28, 2024

if renamer hangs, it is because no filenames were passed as command line arguments so it is waiting for input on stdin..

If you're on a mac, use single quotes..

renamer --find .d.ts --replace .ts './src/generated/**'

from renamer.

mxro avatar mxro commented on September 28, 2024

Thank you for getting back to me!

I have changed the command to renamer --find .d.ts --replace .ts './src/generated/**'.

Unfortunately, it still hangs after upgrading to renamer@^2.0.1

Screen Shot 2020-06-08 at 6 22 52 am

from renamer.

75lb avatar 75lb commented on September 28, 2024

Closing as this hanging issue is not a bug with renamer itself.

from renamer.

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.