decentraland / decentraland/editor-sdk7
Having a `node` setup introduces issues
- Dominant language
- TypeScript
- Stars
- 3
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
## Intro
Many people have struggled with this issue. Some worked around it with a manual `npm install` in the extension folder, while others couldn't. https://github.com/decentraland/editor-sdk7/issues/111 might relate to this.
Some of their representations are: `sdk-commands not found`, `not being able to copy cache`, `npm install failed`
I've seen there is already a `node` environment in most of the cases (i can't say 100% because I'm not sure)
## A repro case for Windows
1. Remove all the node environments in your machine (uninstall nvm-windows - if you have - , node)
2. Install nvm-windows: https://github.com/coreybutler/nvm-windows/releases
3. Install node with `nvm install lts` and `nvm use 20.15.0` (at the time this issue is written)
4. Clean Decentraland vscode extension
5. Open only one window of VSCode and without opening a folder and install the Decentraland SDK7 Extension version 1.53.1 (latest at the time this is written)
6. Click on the extension icon in the VSCode's left-bar to activate the extension and open the output > Decentraland SDK7
7. See how now it's failing in the copy cache step

In this case, the issue is working around it with an early return in the `cacheDependencies` method (with hacky modifying the dist/editor.js file) here https://github.com/decentraland/editor-sdk7/blob/52ffce674a3d01f9bc5ea0870df313ec250bfff1/src/modules/npm.ts#L113
Contributor guide
Research direction
Start with src/modules/npm.ts, especially the cacheDependencies method referenced in the issue, and reproduce the Windows setup using nvm-windows with Node 20.15.0. Check the VSCode extension output for the cache-copy, sdk-commands, and npm install failures. Done means the extension activates and installs or copies its dependencies without a manual npm install or an early-return hack.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript, vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100