Home  >  Q&A  >  body text

How to resolve warnings when running a newly created Next.js application?

I created a new next.js application using npx create-next-app ./ ./ I haven't touched any of the code or even opened it in an editor.

When running this application using npm run dev I get these very long warnings.

$ npm run dev

> test@0.1.0 dev
> next dev

- ready started server on 0.0.0.0:3000, url: http://localhost:3000
- event compiled client and server successfully in 1605 ms (20 modules)
- wait compiling...
- event compiled client and server successfully in 593 ms (20 modules)
- wait compiling /page (client and server)...
- warn ./node_modules/next/dist/client/add-base-path.js
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* javascript/auto|C:\Users\Admin\Desktop\Desktop\WD\NEXTjs\test\test\node_modules\next\dist\compiled\@next\react-refresh-utils\dist\loader.js!C:\Users\Admin\Desktop\Desktop\WD\NEXTjs\test\test\node_modules\next\dist\build\webpack\loaders\next-flight-client-module-loader.js!C:\Users\Admin\Desktop\Desktop\WD\NEXTjs\test\test\node_modules\next\dist\build\webpack\loaders\next-swc-loader.js??ruleSet[1].rules[6].oneOf[4].use[2]!C:\Users\Admin\Desktop\Desktop\WD\NEXTjs\test\test\node_modules\next\dist\client\add-base-path.js|app-client
    Used by 3 module(s), i. e.
    javascript/auto|C:\Users\Admin\Desktop\Desktop\WD\NEXTjs\test\test\node_modules\next\dist\compiled\@next\react-refresh-utils\dist\loader.js!C:\Users\Admin\Desktop\Desktop\WD\NEXTjs\test\test\node_modules\next\dist\build\.................

The page has been loaded.

P粉019353247P粉019353247213 days ago405

reply all(2)I'll reply

  • P粉488464731

    P粉4884647312024-02-22 12:49:19

    I think you just need to delete ./ and run the command.

    npx create-next-app@latest

    Afterwards, when the command asks for the project name, just write . and press Enter.

    reply
    0
  • P粉340980243

    P粉3409802432024-02-22 12:10:06

    I found the problem. Next.js doesn't like placing the application in the Desktop/desktop/... folder, so it throws an error. I just changed the folder name and it worked.

    reply
    0
  • Cancelreply