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

name of next.js project cannot start with 'ud' #57780

Closed
1 task done
Hwlhwlxyz opened this issue Oct 30, 2023 · 4 comments
Closed
1 task done

name of next.js project cannot start with 'ud' #57780

Hwlhwlxyz opened this issue Oct 30, 2023 · 4 comments
Labels
bug Issue was opened via the bug report template. create-next-app Related to our CLI tool for quickly starting a new Next.js application. locked

Comments

@Hwlhwlxyz
Copy link

Link to the code that reproduces this issue

https://github.com/Hwlhwlxyz/next.js-project-start-with-ud

To Reproduce

  1. run npx [email protected], and then set the name to any string start with 'ud', such as 'udv_app'.
C:\temp\nextjs-test>npx [email protected]
Need to install the following packages:
  [email protected]
Ok to proceed? (y) y

√ What is your project named? ... udv_app
√ Would you like to use TypeScript? ... No / Yes
√ Would you like to use ESLint? ... No / Yes
√ Would you like to use Tailwind CSS? ... No / Yes
√ Would you like to use `src/` directory? ... No / Yes
√ Would you like to use App Router? (recommended) ... No / Yes
√ Would you like to customize the default import alias (@/*)? ... No / Yes
Creating a new Next.js app in C:\temp\nextjs-test\udv_app.

Using npm.

Initializing project with template: default


Installing dependencies:
- react
- react-dom
- next



added 22 packages, and audited 23 packages in 12s

3 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Initialized a git repository.

Success! Created udv_app at C:\temp\nextjs-test\udv_app
  1. After create the project, run npm run dev.
  2. open browser, and go to 'http://localhost:3000/'

Here are logs

> [email protected] dev
> next dev

   ▲ Next.js 14.0.1
   - Local:        http://localhost:3000

 ✓ Ready in 3.3s
thread '<unnamed>' panicked at C:\Users\JayJa\.cargo\registry\src\index.crates.io-6f17d22bba15001f\swc_ecma_codegen-0.146.2\src\lib.rs:3883:53:
byte index 6 is out of bounds of `\ud`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at C:\Users\JayJa\.cargo\registry\src\index.crates.io-6f17d22bba15001f\swc_ecma_codegen-0.146.2\src\lib.rs:3883:53:
byte index 6 is out of bounds of `\ud`
thread '<unnamed>' panicked at C:\Users\JayJa\.cargo\registry\src\index.crates.io-6f17d22bba15001f\swc_ecma_codegen-0.146.2\src\lib.rs:3883thread ':<unnamed>53' panicked at :
C:\Users\JayJa\.cargo\registry\src\index.crates.io-6f17d22bba15001f\swc_ecma_codegen-0.146.2\src\lib.rsbyte index 6 is out of bounds of `\ud`:3883
:53:
byte index 6 is out of bounds of `\ud`
thread '<unnamed>' panicked at C:\Users\JayJa\.cargo\registry\src\index.crates.io-6f17d22bba15001f\swc_ecma_codegen-0.146.2\src\lib.rs:3883:53:
byte index 6 is out of bounds of `\ud`
 ⨯ ./src/pages/_app.js
Error: failed to process byte index 6 is out of bounds of `\ud`
 ○ Compiling / ...
thread '<unnamed>' panicked at C:\Users\JayJa\.cargo\registry\src\index.crates.io-6f17d22bba15001f\swc_ecma_codegen-0.146.2\src\lib.rs:3883:53:
byte index 6 is out of bounds of `\ud`
thread '<unnamed>' panicked at C:\Users\JayJa\.cargo\registry\src\index.crates.io-6f17d22bba15001f\swc_ecma_codegen-0.146.2\src\lib.rs:3883:53:
byte index 6 is out of bounds of `\ud`
thread 'thread '<unnamed><unnamed>' panicked at ' panicked at C:\Users\JayJa\.cargo\registry\src\index.crates.io-6f17d22bba15001f\swc_ecma_codegen-0.146.2\src\lib.rsC:\Users\JayJa\.cargo\registry\src\index.crates.io-6f17d22bba15001f\swc_ecma_codegen-0.146.2\src\lib.rs::38833883::5353:
:
byte index 6 is out of bounds of `\ud`byte index 6 is out of bounds of `\ud`

thread '<unnamed>' panicked at C:\Users\JayJa\.cargo\registry\src\index.crates.io-6f17d22bba15001f\swc_ecma_codegen-0.146.2\src\lib.rs:3883:53:
byte index 6 is out of bounds of `\ud`
 ⨯ ./src/pages/_app.js
Error: failed to process byte index 6 is out of bounds of `\ud`

Current vs. Expected behavior

If I change the name to other strings without leading 'ud', the project can run.

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Home
Binaries:
  Node: 18.18.2
  npm: 9.8.1
  Yarn: N/A
  pnpm: 8.4.0
Relevant Packages:
  next: 14.0.1-canary.5
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: N/A
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

App Router, CLI (create-next-app)

Additional context

No response

@Hwlhwlxyz Hwlhwlxyz added the bug Issue was opened via the bug report template. label Oct 30, 2023
@github-actions github-actions bot added the create-next-app Related to our CLI tool for quickly starting a new Next.js application. label Oct 30, 2023
@auziqni

This comment has been minimized.

@darklight9811
Copy link

darklight9811 commented Oct 31, 2023

Same issue here, tried several versions and couldn't make it work. More precisely it can't contain ud in the path, not just the project itself.

@balazsorban44
Copy link
Member

Duplicate of #36078

@balazsorban44 balazsorban44 marked this as a duplicate of #36078 Nov 1, 2023
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. create-next-app Related to our CLI tool for quickly starting a new Next.js application. locked
Projects
None yet
Development

No branches or pull requests

4 participants