Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playwright-core Module parse failed: Unexpected character '' #23

Open
andronesh opened this issue Jul 8, 2023 · 0 comments
Open

playwright-core Module parse failed: Unexpected character '' #23

andronesh opened this issue Jul 8, 2023 · 0 comments

Comments

@andronesh
Copy link

Trying to fetch video info from Next.js router:

import { fetchVideo } from "tiktok-scraper-ts";

export async function GET(request: NextRequest, response: NextResponse) {
  try {
    const link =
      "https://www.tiktok.com/@colouredhorses/video/7239893633372114183";
    const video = await fetchVideo(link);
    return NextResponse.json(video, { status: 200 });
  } catch (e) {
    console.error(`Error while trying to get video info`, e);
    return NextResponse.json(
      { error: "Something went wrong." },
      { status: 500 }
    );
  }
}

but it fails with error:

- error ./node_modules/playwright-core/lib/webpack/recorder/assets/codicon-dcd00fb4.ttf
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

Import trace for requested module:
./node_modules/playwright-core/lib/webpack/recorder/assets/codicon-dcd00fb4.ttf
./node_modules/playwright-core/lib/webpack/recorder/ sync ^\.\/.*$
./node_modules/playwright-core/lib/server/recorder/recorderApp.js
./node_modules/playwright-core/lib/server/debugController.js
./node_modules/playwright-core/lib/server/playwright.js
./node_modules/playwright-core/lib/server/index.js
./node_modules/playwright-core/lib/inProcessFactory.js
./node_modules/playwright-core/lib/inprocess.js
./node_modules/playwright-core/index.js
./node_modules/playwright-chromium/index.js
./node_modules/tiktok-signature/index.js
./node_modules/tiktok-scraper-ts/dist/main.js
./src/app/api/imports/route.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant