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

When using Dataform in Google Cloud Platform the Dataform extension in VS Code does not work #1589

Open
stantyan opened this issue Nov 23, 2023 · 4 comments
Assignees
Labels

Comments

@stantyan
Copy link

We have the following setup:

  • Develop Dataform code locally in VS Code and push to remote Github repository
  • Dataform in Google Cloud Platform pulls the latest release of the main branch and executes the workflow

When installing and enabling Dataform extension in VS Code it shows this error:
The Dataform Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.

In the output:
Dataform encountered an error: Could not find a recent installed version of @dataform/core in the project. Ensure packages are installed and upgrade to a recent version.

Does it mean that this extension works only with Dataform Core local repositories?

I just need syntax highlighting and cmd + click on a ref() function feature to go to the file that it references.

Please suggest.

@GJMcGowan
Copy link
Collaborator

Hello!

Firstly, as you're using GCP then I would be remiss if I didn't note that we have a Dataform editor in GCP which is a lot more polished and has more functionality than what the vscode extension provides - https://cloud.google.com/dataform/docs/overview

Secondly, you need to have the dataform CLI installed globally, as well as all npm packages inside the project. I think the later is the error you're getting at the moment. So just run npm i in your project directory.

@GJMcGowan GJMcGowan self-assigned this Nov 27, 2023
@dragonlobster
Copy link

Dataform GCP syntax highlighting is very buggy and problematic. Just one simple example, it breaks the moment you add any regular expression:

select REGEXP_REPLACE(JSON_QUERY(a.json_field, "$.jsonKey"), r'([\'\"])', '') as VALUE
FROM table a
WHERE a.some_field > 1;

image

Even markdown syntax highlighting gets it right where as dataform can't.

@michaelsnook
Copy link

you need to have the dataform CLI installed globally, as well as all npm packages inside the project. I think the later is the error you're getting at the moment. So just run npm i in your project directory.

Hi I'm having the same problem. I have packages installed, with dataform globally and npm i in this project. (It was working yesterday; only changed in the middle of my work-day today.) I also did dataform install for good measure. And removed node_modules and started over. Using dataform 2.9.0.

note that we have a Dataform editor in GCP which is a lot more polished and has more functionality than what the vscode extension provides - https://cloud.google.com/dataform/docs/overview

This isn't an option for me because the git integration available in the web interface doesn't allow me to break up my work into commits (and push them without pushing everything I've changed) or to amend commits or to pull amended commits or force-pushed branches. It's just not a good trade-off to have to use a less complete version of git.

@Ekrekr Ekrekr added the bug label Apr 16, 2024
@Ekrekr
Copy link
Contributor

Ekrekr commented Nov 11, 2024

We've had a bunch of changes to the vscode extension by @moker-spaghetti this year. I would be surprised if these issues remained! Could you install the latest version, and try recreating? Thanks.

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

No branches or pull requests

5 participants