Skip to content
Discussion options

You must be logged in to vote

This was caused by naming the project as @next/project-name, recommending to add this case on

const { valid, problems } = validateNpmName(projectName)
if (!valid) {
console.error(
`Could not create a project called ${red(
`"${projectName}"`
)} because of npm naming restrictions:`
)
problems!.forEach((p) => console.error(` ${red(bold('*'))} ${p}`))
process.exit(1)
}

with error name can only contain URL-friendly characters, which occurs when naming the project starting with @.

Edit

The dependency validate-npm-package-name which Next.js is using passes @…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@maxpsq
Comment options

Answer selected by devjiwonchoi
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@devjiwonchoi
Comment options

devjiwonchoi Sep 4, 2025
Maintainer Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants