Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Deploy reloaded no longer working after vscode update to 1.59.0 #186

Open
jcamachott opened this issue Aug 5, 2021 · 26 comments
Open

Deploy reloaded no longer working after vscode update to 1.59.0 #186

jcamachott opened this issue Aug 5, 2021 · 26 comments

Comments

@jcamachott
Copy link

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
Copy link
Author

Already tried an uninstall and reinstall

@csears123
Copy link

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.

@jcamachott
Copy link
Author

I reverted to 1.58.2 until it's sorted out.

@molamooo
Copy link

molamooo commented Aug 6, 2021

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

@molamooo
Copy link

molamooo commented Aug 6, 2021

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

@csears123
Copy link

@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

@molamooo
Copy link

molamooo commented Aug 6, 2021

@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 \.

@fstemarie
Copy link

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.

@ezekiel747
Copy link

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

@3zzy
Copy link

3zzy commented Aug 9, 2021

Having the same issue :(

@safualianp
Copy link

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

@bavarianbytes
Copy link

Same here...

@wobility
Copy link

Same error on macOS 11.5.1

@wobility
Copy link

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
Copy link

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.

@caiomaioral
Copy link

Here the same problem :/

@FranCarstens
Copy link

FranCarstens commented Aug 11, 2021

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

@antolopez
Copy link

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

@Wilkware
Copy link

Cool, workaround rocks!

@orellabac
Copy link

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

@balbertho
Copy link

balbertho commented Aug 14, 2021

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");

@termigrator
Copy link

balbertho had the working solution. Thanks!

@FranCarstens
Copy link

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

@AdDfNet
Copy link

AdDfNet commented Aug 18, 2021

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

@gsabater
Copy link

Suddenly this seems relevant once again
#74

@feumw
Copy link

feumw commented Aug 24, 2021

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.

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

No branches or pull requests