Skip to content

Failed to complie with version 1.7.0 #97

Description

@niftycodeltd

Versions

  • @prismicio/next: v1.7.0
  • next: v14.2.15
  • node: v20.15.0

Reproduction

When trying to run local environemnt I get the follwoing error:

Error: 
  x The "use client" directive must be placed before other expressions. Move it to the top of the file to resolve this issue.
   ,-[/Volumes/G-DRIVE/Sites/klarhr/node_modules/.pnpm/@prismicio+next@1.7.0_@prismicio+client@7.11.0_next@14.2.15_@babel+core@7.24.5_@opentelemetry_juxepsp2vil4b7btg4ixjanjr4/node_modules/@prismicio/next/dist/PrismicNextImage.js:1:1]
 1 | 'use client';
 2 | 'use client';
   : ^^^^^^^^^^^^^
 3 | import { jsx, Fragment } from "react/jsx-runtime";
 4 | import Image from "next/image";
 5 | import { buildURL } from "imgix-url-builder";
   `----

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions