mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.49k stars 300 forks source link

Failed to install dependencies using yarn #415

Closed BraveOtter closed 4 years ago

BraveOtter commented 4 years ago

Describe the bug Following this guide to add a new driver: https://vscode-sqltools.mteixeira.dev/contributing/support-new-drivers I obtain an error while I execute "yarn".

To Reproduce Steps to reproduce the behavior:

  1. Clone https://github.com/mtxr/vscode-sqltools.git
  2. Open CMD and go to project folder
  3. Execute "yarn"

Desktop (please complete the following information):

Additional context Complete yarn command result:

yarn install v1.19.1
[1/5] Validating package.json...
warning sqltools@0.21.0: The engine "vscode" appears to be invalid.
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@1.2.9: The platform "win32" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
warning workspace-aggregator-4d1e5785-d1c0-4f7f-a087-38a7b6f200d5@0.21.0: The engine "vscode" appears to be invalid.
warning @sqltools/extension@0.21.0: The engine "vscode" appears to be invalid.
warning @sqltools/plugins@0.21.0: The engine "vscode" appears to be invalid.
warning vscode-languageclient@5.2.1: The engine "vscode" appears to be invalid.
[4/5] Linking dependencies...
warning "workspace-aggregator-4d1e5785-d1c0-4f7f-a087-38a7b6f200d5 > @sqltools/extension > @babel/cli@7.5.5" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-4d1e5785-d1c0-4f7f-a087-38a7b6f200d5 > @sqltools/extension > babel-loader@8.0.6" has unmet peer dependency "@babel/core@^7.0.0".
warning "workspace-aggregator-4d1e5785-d1c0-4f7f-a087-38a7b6f200d5 > @sqltools/ui > @devexpress/dx-react-grid@2.0.4" has unmet peer dependency "@devexpress/dx-core@2.0.4".
warning "workspace-aggregator-4d1e5785-d1c0-4f7f-a087-38a7b6f200d5 > @sqltools/ui > @devexpress/dx-react-grid-material-ui@2.0.4" has unmet peer dependency "@devexpress/dx-grid-core@2.0.4".
warning "workspace-aggregator-4d1e5785-d1c0-4f7f-a087-38a7b6f200d5 > @sqltools/ui > @devexpress/dx-react-grid > @devexpress/dx-grid-core@2.0.4" has unmet peer dependency "@devexpress/dx-core@2.0.4".
[5/5] Building fresh packages...
[-/3] ⡀ waiting...
[3/3] ⡀ @sqltools/extension
error c:\Pruebas\vscode-sqltools\node_modules\@sqltools\extension: Command failed.
Exit code: 1
Command: yarn run vscode-install
Arguments:
Directory: c:\Pruebas\vscode-sqltools\node_modules\@sqltools\extension
Output:
yarn run v1.19.1
warning @sqltools/extension@0.21.0: The engine "vscode" appears to be invalid.
$ c:\Pruebas\vscode-sqltools\node_modules\@sqltools\extension\node_modules\.bin\vscode-install
internal/modules/cjs/loader.js:797
    throw err;
    ^

Error: Cannot find module 'c:\Pruebas\vscode-sqltools\node_modules\node_modules\vscode\bin\install'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
error Command failed with exit code 1.
BraveOtter commented 4 years ago

I have managed to "solve" it by copying the folder /node_modules/vscode in /node_modules/node_modules/vscode very very very fast just after yarn downloads the dependencies.

Of course, this is not a good solution xD

mtxr commented 4 years ago

In the project root, try to rm node_modules ../node_modules ../packages/*/node_modules -rf and then yarn. This kind of error usually happens because of some broken packages.

The command that was breaking is an internal command of VScode package and generate just types, so removing and running yarn again.

BraveOtter commented 4 years ago

No way @mtxr

I obtain the same error. I tried to remove project folder and clone it again (and execute yarn again). Same result.