On this page:
7.1.1 Alternative causes
Version: 4.2.1

7.1 Unbound identifier in transformer environment

Looks like this, in recent versions of PLT Scheme:

compile: unbound identifier in transformer environment (and no #%app syntax transformer is bound) in: syntax-case

In older versions, the same error appeared with this more frightening countenance:

compile: bad syntax; function application is not allowed, because no #%app syntax transformer is bound in: (syntax-case ___)

Usually, this means that you forgot to require scheme/base for-syntax. The scheme/base language does not provide a transformer-environment (aka for-syntax, phase 1) binding for syntax-case (or lambda, or anything else except for syntax-rules). So when the compiler encounters (syntax-case __), since it doesn’t find a phase-1 binding for syntax-case, it figures that the expression must be a function call instead. Then it looks for a binding of #%app, fails to find it, and reports that error.

Here is an example:
  (module m scheme/base
    (define-syntax (my-macro stx)
      (syntax-case stx ()
        __)))

The fix is to add (require (for-syntax scheme/base)) to the module where the bad expression occurs. Thus:
  (module m scheme/base
    (require (for-syntax scheme/base))
    (define-syntax (my-macro stx)
      (syntax-case stx ()
        __)))
Or just use the scheme language, which includes a richer set of transformer (phase-1) bindings automatically:
  (module m scheme
    (define-syntax (my-macro stx)
      (syntax-case stx ()
        __)))

If the expression the error refers to doesn’t look like the body of a macro or static info expression (see Static Information), then continue to the next section.

7.1.1 Alternative causes

Another way to get this error is to neglect to require scheme/base for-template in a code generator module (see Code Generators). The macro expander goes through the same process as above, but at a different phase.