Next.js Discord

Discord Forum

How am i supposed to use nextjs scripts (https://github.com/vercel/next.js/tree/canary/scripts)?

Unanswered
Long-legged ant posted this in #help-forum
Open in Discord
Long-legged antOP
I want to use nextjs scripts in the folder i found on nextjs. but these don't get bundled with my install.. Is the correct way to use them to clone the entire nextjs repo (seems to be over a GB) and then npm install and run it from there?

1 Reply

Long-legged antOP
okay I figured it out.

clone the repo (its large) to a folder (eg. git clone .. )
then pnpm install
then pnpm run build

then you can use the scripts from the next.js cloned folder

eg.
node scripts/trace-to-tree.mjs path_to_your_trace