Local development environment

Hi,

I try to deploy local server for dev (last version/main).
(I followed the guide : Local development environment | Speckle Docs)

  • In step (4) yarn build, I had an error that I was able to correct by :
    yarn add autoprefixer

  • and the build ended with the error :
    The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph
    Probably nothing serious?

  • In step (8) yarn dev :
    Error :
    [server] ERROR: Cannot find module ... node_modules/@speckle/shared/dist-cjs/index.js
    [gqlgen] [FAILED] ...
    [@speckle/dui3]: [1] [FAILED]
    [@speckle/frontend-2]: [1] [FAILED] .
    Apollo Client error
    networkError: TypeError: Failed to parse URL from UNDEFINED/graphql

  • In browser localhost:3000 :
    Hello world! Query results:
    latest: 2.14.7-alpha.37394
    xyz: 2.14.6

And all dev containers are started !

I have the impression that there are missing components or not !?

---------------------------------- 
Node/npm  v18.16.0/v9.5.1
Yarn  v3.2.0
Docker/compose  v24.0.1/v2.14.2
Ubuntu  22.04.2
---------------------------------- 

@Tamu Hey, I’ve just pushed in some minor fixes (e.g. for the autoprefixer issue) in main. I’m also in the process of updating docs, but while they get approved you can see the changes here: speckle-docs/server-local-dev.md at 136108e056d225fe796790be3b70837e17093b9b · specklesystems/speckle-docs · GitHub

The steps you’re missing are related to creating .env files for dui3 and frontend-2. Regarding other errors I added this part to the docs:

When running yarn dev for all packages you might see errors relating to @speckle/shared being missing, but this is only temporarily because @speckle/shared is also being re-built at that point in time. Once its finished building all of the other packages should pick up on it and work fine. You might also see GraphQL Codegen errors, which also are temporary, because they rely on the speckle server being up and running.

I suggest running only needed components separately anyway. If you don’t need live preview generation and file imports to work you can usually get away with just running yarn dev in the server and frontend packages.

4 Likes

Hi @fabians ,

Big thanks for your minor fixes and the new docs update !!!

It works beautifully :rocket: (with yarn dev in root folder)

It’s also a good idea to only run the front + server !

4 Likes