vscode-duplicate icon indicating copy to clipboard operation
vscode-duplicate copied to clipboard

Unable to build and run the extension

Open nene opened this issue 2 years ago • 2 comments

I wanted to see if I can fix some of the problems in this extension, but was unable to build and run it locally.

First off I checked out the repository and installed dependencies:

git clone [email protected]:mrmlnc/vscode-duplicate.git
cd vscode-duplicate/
npm install

This already produced some warning signs:

  • deprecation notices for [email protected], [email protected], [email protected]
  • 10 vulnerabilities (6 moderate, 3 high, 1 critical)
  • the package-lock.json file did not exist in the repo, instead it was listed in .gitignore. So it's more likely that the dependencies I installed ended up being newer and not quite as compatible with the dependencies intended by the author.

Next I tried running the extension in VSCode, but that resulted in error - the extension wants to load itself from out/ dir, which didn't exist yet. So I tried running the build script:

npm run build

This resulted in error: sh: rimraf: command not found. Turns out that rimraf dependency is missing in devDependencies. So I installed it:

npm install --save-dev rimraf

and ran the build again.

This time the build failed at TypeScript compilation with errors like:

node_modules/@types/lodash/common/array.d.ts:37:56 - error TS1005: ';' expected.

37     type Falsey = null | undefined | false | "" | 0 | 0n;
                                                          ~


node_modules/@types/lodash/common/object.d.ts:1025:21 - error TS1110: Type expected.

1025         : K extends `${number}`
                         ~~~

Realizing that the extension uses a really old TypeScript version, I decided to give up and go looking for an alternative. I switched to FileUtils extension and uninstalled this one.

Environment

  • VSCode Version: 1.74.0
  • OS Version: MacOS 12.6

nene avatar Dec 16 '22 10:12 nene

Hi @nene, Since this repo is no longer receive any updates. I've tried to fork and fix it too, but the node version is way too old (node 7), it is unable to maintain.

Instead, I suggest you to try this extension instead, it's the same as this one (even better and lighter). Just give it a try! 👉 https://marketplace.visualstudio.com/items?itemName=trandaison.trandaison-vscode-duplicate

image

trandaison avatar Nov 01 '23 08:11 trandaison

Thanks @trandaison, I've since switched to the File Utils extension, which has worked much better than the vscode-duplicate extension ever did.

nene avatar Nov 01 '23 09:11 nene