Skip to content

standalone create --template content is uninstallable: depends on unpublished @agent-native/embedding #1337

@XeriaCo

Description

@XeriaCo

Summary

npx @agent-native/core@latest create <name> --standalone --template content scaffolds a project that cannot be installed, because it depends on @agent-native/embedding, which is not published to npm.

Repro

npx @agent-native/core@latest create my-app --standalone --template content
cd my-app
pnpm install

pnpm install fails during resolution:

ERR_PNPM_FETCH_404  GET https://registry.npmjs.org/@agent-native%2Fembedding: Not Found - 404
@agent-native/embedding is not in the npm registry, or you have no permission to fetch it.

The generated package.json contains:

"dependencies": {
  "@agent-native/core": "latest",
  "@agent-native/embedding": "latest",   // <-- 404, not on npm
  ...
}

and app/components/editor/extensions/ImageBlock.tsx imports it:

import { EmbeddedApp, type EmbeddedAppRef } from "@agent-native/embedding/react";

If you patch around the install failure, the dev server then throws at SSR render time:

Error: Cannot find module '@agent-native/embedding/react'
  imported from .../app/components/editor/extensions/ImageBlock.tsx

Root cause

In the monorepo the content template depends on embedding via workspace:*:

// templates/content/package.json
"@agent-native/embedding": "workspace:*"

so it resolves to the local packages/embedding. The create --standalone path rewrites workspace:*latest, but only @agent-native/core is published@agent-native/embedding (and @agent-native/desktop, @agent-native/cli) all return 404 from the registry. So any standalone scaffold of a template that imports embedding is dead on arrival.

npm view @agent-native/core version       # 0.63.4  ✅
npm view @agent-native/embedding version   # E404    ❌

Suggested fixes (any one)

  1. Publish @agent-native/embedding to npm (it already has publishConfig.access: public); the standalone rewrite then resolves.
  2. Re-export EmbeddedApp from @agent-native/core (e.g. @agent-native/core/embedding) and update the content template import, dropping the separate dependency.
  3. Have the create/--standalone codegen vendor the embedding source into the scaffold (and drop the dep) when the package isn't published.

Workaround (for anyone hitting this now)

Vendor it from the repo:

# from the scaffolded project root
cp -R <agent-native clone>/packages/embedding vendor/embedding
# package.json: "@agent-native/embedding": "link:./vendor/embedding"   (link:, not file:)
pnpm install
pnpm exec tsc -p vendor/embedding/tsconfig.json   # build dist/

link: (not file:) matters — file: snapshot-copies the dir at install time, before dist/ is built, so the export can't resolve. embedding has no runtime deps of its own (only peer deps on core + react), so the live symlink installs cleanly.

Environment

  • @agent-native/core@latest = 0.63.4
  • macOS (darwin arm64), Node 22, pnpm 10
  • Templates affected: content (standalone); likely any template importing @agent-native/embedding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions