Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build and run the extension #59

Open
nene opened this issue Dec 16, 2022 · 2 comments
Open

Unable to build and run the extension #59

nene opened this issue Dec 16, 2022 · 2 comments

Comments

@nene
Copy link

nene commented Dec 16, 2022

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 git@github.com:mrmlnc/vscode-duplicate.git
cd vscode-duplicate/
npm install

This already produced some warning signs:

  • deprecation notices for vscode-test@0.4.3, mkdirp@0.5.1, vscode@1.1.37
  • 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
@trandaison
Copy link

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

@nene
Copy link
Author

nene commented Nov 1, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants