Comments (7)
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.
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.
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.
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.
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.
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
from renamer.
Closing as this hanging issue is not a bug with renamer itself.
from renamer.
Related Issues (20)
- Dry-run doesn't log anything HOT 5
- Broken on node v12 HOT 1
- using renamer within nodejs app HOT 1
- Can't able to add exclude directory in files options Array HOT 2
- Can't able use it as global node package HOT 1
- Is there any way to only rename the files without renaming directories? HOT 1
- option to only log summary HOT 3
- Unknown option: --regex HOT 2
- Preset the naming method of some files or directories? HOT 6
- Regex issue with Git Bash on Windows HOT 5
- Regex /^$/ can't work HOT 5
- Make the resulting operation (e.g. rename, copy, git mv etc) user-definable HOT 1
- escaping hifen HOT 2
- Error with files starting with "." (dot) HOT 1
- --git flag? HOT 1
- FR: typescript support HOT 1
- Add --skip option (opposite of --force)
- Strange output HOT 2
- hash string HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from renamer.