Netlify Create with NPM Workspace, is this possible?

I’m trying to use Netlify Createvisual editor with NPM Workspace, can you guys help me? Is this possible?

Should be, did you try it?

1 Like

Yes, I tried. I have a Next.js inside /core folder running very well.
I build it with static exportation within /core/out for static files generated by Next.js.
I just leave blank that Visual Editor settings Visual Editor / General Settings / Runnable directory and also Visual Editor / General Settings / Visual Editor Landing Page.
This is part of my netlify.toml:

[build]
    command = "npm run build --workspace=core"
    functions = "core/src/api"
    publish = "core/out"

This error message apperars in dashboard pannel:

Visual editor unavailable
We recommend checking the logs and fixing any code issues, then verifying
Once you’ve made any changes, restart the container.

I’m unabled to see detailed log, I crash the preview every time I restart it.

What site is this happening on?

What exactly would you like to know? The final URL of the website?

the Site ID Would be helpful.

Site ID: e7c7755b-991c-4cd3-b869-98b070db2f55
Sorry by my ignorance, have you guys access to my website with this Site ID

Have you configured a stackbit.config.ts file? I’d recommend checking out our documentation on setting up the visual editor here:

1 Like

Thanks guys for all the support. Visual Editor is working now. I coded this stackbit file stackbit.config.ts in the root folder of the project workspace:

import { defineStackbitConfig } from "@stackbit/types";
import { GitContentSource } from "@stackbit/cms-git";

export default defineStackbitConfig({
  stackbitVersion: "~0.6.0",
  ssgName: "nextjs",
  nodeVersion: "20", // Node.js v20
  cmsName: "netlifycms", // I can't see until now how this works
  contentSources: [
    new GitContentSource({
      rootPath: __dirname,
      contentDirs: ["content"], // folder for all mix content
      models: [
        {
          label: "Dynamic Page", // first attempt in creating something
          name: "dynamicPage",
          type: "page", // tipo de modelo dinâmico
          urlPath: "/{slug}",
          file: "content/dynamic-pages/{slug}.md",
          fields: [
            { name: "title", type: "string", label: "Title" },
            { name: "date", type: "date", label: "Date" },
            {
              name: "pageDescription",
              type: "text",
              label: "Page Description",
            },
          ],
        },
      ],
      assetsConfig: {
        referenceType: "static", // some config for static export website
        staticDir: "content/public", // public folder
        uploadDir: "content/public/images", // images upload folder
        publicPath: "/", // live public path www...com/publicPath/some-path
      },
    }),
  ],
  buildCommand: "npm run build", // build command
  devCommand: "npm run dev", // dev command
});