Skip to content

Tutorial is outdated and fails on modern Clarinet/Vitest stack #3

Description

@Vanhuyne

Summary

Following this tutorial currently fails on a fresh setup due to version/config drift.
I’m opening this issue to provide a reproducible report and propose fixes.

Environment

  • Date tested: March 3, 2026
  • OS: macOS (Apple Silicon)
  • Node: v22.16.0 (also tested with Node 20 LTS)
  • npm: <your npm -v>
  • Clarinet: <your clarinet --version>

Reproduction

  1. Clone repo
  2. Install dependencies: npm install
  3. Run checks/tests:
    • clarinet check
    • npm test -- --run

Current errors observed

  • Deployment plan parsing error:
    • unknown variant 'transaction-type' in deployments/default.simnet-plan.yaml
  • Missing contract file:
    • unable to find contract at contracts/mock-token-2.clar
  • Contract compile issue:
    • unresolved THIS_CONTRACT / invalid use around transfer calls in contracts/amm.clar
  • Vitest runtime issues (depending on Node/version combo):
    • Failed to start forks worker
  • Vitest deprecation warning:
    • clarinet environment uses deprecated transformMode (Vitest 4 warning)

Expected behavior

  • clarinet check passes
  • npm test -- --run passes out of the box for first-time learners

Proposed fix

  • Align Clarinet.toml contract paths/versions
  • Ensure mock-token-2 is present or mapped correctly
  • Update transfer logic in amm.clar to valid Clarity pattern
  • Update vitest.config to stable worker pool (threads, single worker)
  • Regenerate deployment plan with current Clarinet schema
  • Add tested version matrix to README

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions