jhotmann / node-rename-cli

A tool for renaming files quickly, especially multiple files at once.
https://jhotmann.github.io/node-rename-cli/
MIT License
162 stars 18 forks source link

Arch linux DWM #43

Open se7en-x230 opened 3 years ago

se7en-x230 commented 3 years ago

sudo npm i -g rename-cli@beta npm WARN deprecated opn@6.0.0: The package has been renamed to open npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported /usr/bin/rname -> /usr/lib/node_modules/rename-cli/bin.js npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/rename-cli/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code EEXIST npm ERR! syscall symlink npm ERR! path ../lib/node_modules/rename-cli/bin.js npm ERR! dest /usr/bin/rename npm ERR! errno -17 npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/rename-cli/bin.js' -> '/usr/bin/rename' npm ERR! File exists: /usr/bin/rename npm ERR! Remove the existing file and try again, or run npm npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-12-06T08_23_48_335Z-debug.log sudo npm i -g rename-cli@beta 36.60s user 6.90s system 34% cpu 2:07.72 total

jhotmann commented 3 years ago

So I just setup Arch in WSL to give this a test and Arch comes with a rename binary already installed. So your best bet if you want to use this is to do the following:

  1. Clone or download the repo
  2. Open package.json in your editor of choice
  3. Remove the line "rename": "./bin.js", and save
  4. From the repository folder run sudo npm i -g
  5. Use the rname command

Or if you are never going to use the other rename command you can run npm install with the --force option to wipe it out.

Edit: I'm also looking into options for choosing a binary name

se7en-x230 commented 3 years ago

With the edit I get it installed BUT not started.

seven@purearch ~d/node-rename-cli (git)-[master] % rname /usr/lib/node_modules/rename-cli/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:81 throw new Error(Please install ${moduleName} package manually); ^

Error: Please install sqlite3 package manually at ConnectionManager._loadDialectModule (/usr/lib/node_modules/rename-cli/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:81:15) at new ConnectionManager (/usr/lib/node_modules/rename-cli/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js:24:21) at new SqliteDialect (/usr/lib/node_modules/rename-cli/node_modules/sequelize/lib/dialects/sqlite/index.js:15:30) at new Sequelize (/usr/lib/node_modules/rename-cli/node_modules/sequelize/lib/sequelize.js:340:20) at dbInit (/usr/lib/node_modules/rename-cli/src/database.js:17:19) at Object.module.exports.init (/usr/lib/node_modules/rename-cli/src/database.js:7:25) at /usr/lib/node_modules/rename-cli/bin.js:38:36

sqlite is installed ... core/sqlite 3.34.0-1 3.34.0-1 0.00 MiB

jhotmann commented 3 years ago

What version of Arch are you using? Also what version of Node?

I just did a quick test with Arch in Windows Subsystem for Linux and with Node 14 installed via NVM I was able to install and run like normal.

se7en-x230 commented 3 years ago

Arch is a rolling release so it has no version. Usally the newest packages are available.

I have 15.3.0 installed. community/nodejs 15.3.0-1

I also tried nodejs-lts-fermium - For 14.X version nodejs-lts-erbium - For 12.X version nodejs-lts-dubnium - For 10.X version

with the same errors