Skip to content

Errors with Next.js Setup: Module Not Found, Lockfile Warning, and Build Issues #5

@Tenith01

Description

@Tenith01

I'm encountering the following issues with my Next.js project:

  • Module Not Found: fs
error - ./node_modules/@distube/ytdl-core/lib/utils.js:2:24
Module not found: Can't resolve 'fs' 
  • Lockfile Warning

warning package-lock.json found. Your project contains lock files generated by tools other than Yarn...

  • SWC Dependencies Warning

warn - Lockfile was successfully patched, please run "npm install" to ensure @next/swc dependencies are downloaded

  • Watchpack Errors

Watchpack Error: Error: ENOTDIR: not a directory, scandir '.../node_modules/next/dist/compiled/util/util.js'

  • Steps to Reproduce

    1. Clone the repo.
    2. yarn.
    3. Start the server with yarn dev.
  • Environment

    1. Node.js Version: v18.20.2
    2. Yarn Version: 1.22.21

Additional Notes
I've tried removing package-lock.json, updating Yarn, and clearing .next but issues persist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions