vscode-deploy-reloaded icon indicating copy to clipboard operation
vscode-deploy-reloaded copied to clipboard

Deploy reloaded no longer working after vscode update to 1.59.0

Open jcamachott opened this issue 4 years ago • 26 comments

Description

Deploy Reloaded no longer working. Gives error:

image

Steps to reproduce

I was trying to deploy a commit.

Your environment

VScode Version: 1.59.0 Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8 Date: 2021-08-04T23:13:12.822Z Electron: 13.1.7 Chrome: 91.0.4472.124 Node.js: 14.16.0 V8: 9.1.269.36-electron.0 OS: Windows_NT x64 10.0.19043

jcamachott avatar Aug 05 '21 19:08 jcamachott

Already tried an uninstall and reinstall

jcamachott avatar Aug 05 '21 19:08 jcamachott

I just experienced the same issue... The Deploy (Reloaded) extension stopped after VS Code updated to 1.59.0. In the Output window the plugin option for Deploy Reloaded is missing. Yikes!!! This is pretty critical to our workflow.

I also confirmed an uninstall and reinstall did not resolve the issue.

csears123 avatar Aug 05 '21 21:08 csears123

I reverted to 1.58.2 until it's sorted out.

jcamachott avatar Aug 05 '21 23:08 jcamachott

I found this error in console. image Seems like broken dependency?

molamooo avatar Aug 06 '21 05:08 molamooo

I manage to bypass this issue by removing dependency of *sql and the functionality of running sql after deploy. Made a release here. link

molamooo avatar Aug 06 '21 06:08 molamooo

@Jeffery-Song can you share more information on what you edited to remove the sql dependency? Are any features missing if this dependency is removed?

I am seeing the "mysql" module that is causing the "Cannot find module" error in my Log (Extension Host) output window. The package.json has over 130 objects that use "oneOf" mysql or sql.

[2021-08-06 08:13:29.580] [exthost] [error] Error: Cannot find module 'c:\Users{USER}.vscode\extensions\mkloubert.vscode-deploy-reloaded-0.89.0\node_modules\mysql/lib/Connection' at t (c:\Users{USER}\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\microsoft-authentication\dist\extension.js:1:358851) at Object.patch (c:\Users{USER}\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\microsoft-authentication\dist\extension.js:1:143340) at Module.require (c:\Users{USER}\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\microsoft-authentication\dist\extension.js:1:39134)

I attempted to correct the path to use a Windows backslash "" (below) in the extension.js file, but that did not fix the error. It still cannot find the module. Permissions look find too for those files.

.vscode\extensions\mkloubert.vscode-deploy-reloaded-0.89.0\node_modules\mysql\lib\Connection

csears123 avatar Aug 06 '21 14:08 csears123

@csears123 I'm not familiar with vscode extension develop. From the extension's wiki, sql is only used for operation after deployment. I simply commented out several file that provides sql connection, and a switch case that matches sql. And I also removed the dependency of mysql in package.json. You may check the tag attached with the release I linked above. After these modifications, sql cannot be used as post-deploy operations. As for other occurrence of mysql in package.json, I guess these describes rules for editing vscode-deploy's setting. There's nothing to worry about them, but of course it's better to remove these too.

As for the backslash, I don't think it's the key cause, since I'm using macos that use / rather than \.

molamooo avatar Aug 06 '21 14:08 molamooo

I reverted to 1.58.2 until it's sorted out.

The last commit is from 2 years ago. Something tells me it's the end for this extension... It's sad, I used it a lot.

fstemarie avatar Aug 07 '21 18:08 fstemarie

@mkloubert could you please take a look at this? seems like a critical issue. Thanks!

ezekiel747 avatar Aug 08 '21 20:08 ezekiel747

Having the same issue :(

3zzy avatar Aug 09 '21 00:08 3zzy

@mkloubert any update ?? is there any alternative way to solve this issue ?

safualianp avatar Aug 09 '21 12:08 safualianp

Same here...

bavarianbytes avatar Aug 09 '21 13:08 bavarianbytes

Same error on macOS 11.5.1

wobility avatar Aug 11 '21 09:08 wobility

I reverted to 1.58.2 until it's sorted out.

Do you share the link to download this version for MAC please ? On the officiel website only the last version are available

wobility avatar Aug 11 '21 09:08 wobility

I find a way. Last year I need switch form Deploy to Deploy (reloaded)... Now We need switch form Deploy (reloaded) to Deploy. Fix the problem for me on mac OS.

wobility avatar Aug 11 '21 09:08 wobility

Here the same problem :/

caiomaioral avatar Aug 11 '21 12:08 caiomaioral

Can confirm. VS Code 1.59 update broke this version. Edit: Workaround below works a treat!

FranCarstens avatar Aug 11 '21 16:08 FranCarstens

As a workaround I have commented line 33 (const deploy_targets_operations_sql = require("./targets/operations/sql");) of file (user_folder).vscode-server\extensions\kloubert.vscode-deploy-reloaded-0.89.0\out\targets.js in wsl2 (user_folder).vscode\extensions\kloubert.vscode-deploy-reloaded-0.89.0\out\targets.js

antolopez avatar Aug 12 '21 08:08 antolopez

Cool, workaround rocks!

Wilkware avatar Aug 12 '21 08:08 Wilkware

Yes I applied the same workaround. I think is just some npm that were not included.

orellabac avatar Aug 13 '21 15:08 orellabac

I would like to offer an alternative solution instead of disabling MySQL features:

Cause:

Seems that there is a MySQL type definition in TypeScript 4.4, causing incorrect require binding, the type definition file is as follow:

Windows: ~/AppData/Local/Microsoft/TypeScript/4.4/node_modules/@types/mysql/index.d.ts Mac: ~/Library/Caches/typescript/4.4/node_modules/@types/mysql/index.d.ts Linux ~/.cache/typescript/4.4/node_modules/@types/mysql/index.d.ts

Change file:

Stable ~/.vscode/extensions/mkloubert.vscode-deploy-reloaded-0.89.0/out/sql/mysql.js Insiders ~/.vscode-insiders/extensions/mkloubert.vscode-deploy-reloaded-0.89.0/out/sql/mysql.js Remote Stable ~/.vscode-server/extensions/mkloubert.vscode-deploy-reloaded-0.89.0/out/sql/mysql.js Remote Insiders ~/.vscode-server-insiders/extensions/mkloubert.vscode-deploy-reloaded-0.89.0/out/sql/mysql.js

Change code line 22:

From: const MySQL = require("mysql"); To: const MySQL = require("../../node_modules/mysql");

balbertho avatar Aug 14 '21 05:08 balbertho

balbertho had the working solution. Thanks!

termigrator avatar Aug 14 '21 11:08 termigrator

@balbertho could do a pull request? Or @mkloubert to update this repo with these changes?

FranCarstens avatar Aug 16 '21 13:08 FranCarstens

the last update is 0.89.0 (August 17th, 2019; fixed HTML viewer) ... @mkloubert the product is deprecated or you need some maintainers ?

AdDfNet avatar Aug 18 '21 16:08 AdDfNet

Suddenly this seems relevant once again https://github.com/mkloubert/vscode-deploy-reloaded/issues/74

gsabater avatar Aug 20 '21 13:08 gsabater

macOS Big Sur 11.5.2 Visual Studio Code 1.59.1 deploy-reloaded v0.88.0 + v0.89.0

When I try to use Command Deploy Reloaded: Deploy... Command 'Deploy Reloaded: Deploy ...' resulted in an error (command 'extension.deploy.reloaded.deploy' not found) pops up.

Onsave deploy doesn't even do anything, I assume because vscode doesn't recognize the extension based on the error above.

I reinstalled vscode, I reinstalled the extension but I can't get it running. It's unfortunately an issue for quite some time for me, I just didn't had time to look on it.

feumw avatar Aug 24 '21 12:08 feumw