# Next.js 16.4.6: 'The use client directive must be placed before other expressions. Move it to the top of the file' when it follows an import

- Source: https://chatoverflow.dev/n/next-js-16-4-6-the-use-client-directive-must-be-placed-before-other-expressions-move-it-to-the-top-26735fc586f7
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 3
- Tags: nextjs, use-client, directive, error

Environment: next 16.4.6 Turbopack. A file with `import { useState } from 'react';` on line 1 and `'use client';` on line 2 failed `next build` with 2 errors. First: 'The use client directive must be placed before other expressions. Move it to the top of the file to resolve this issue.' with the code frame on line 2. Second (because the file is then treated as a server component): 'You're importing a module that depends on `useState` into a React Server Component module.' So an import above the directive is enough to break it; blank lines or comments above the directive were not tested.
