npm run build doesn't respect .npmignore
Answered
Dwarf Crocodile posted this in #help-forum
Dwarf CrocodileOP
I have a nextjs project with an api in the /backend directory that houses a laravel project. The problem is that when i run "npm run build" or "pnpm build" it crawls the laravel project and gives me errors there so i can't compile. I have added /backend to the .npmignore but it doesn't ignore the folder.
2 Replies
@Dwarf Crocodile I have a nextjs project with an api in the /backend directory that houses a laravel project. The problem is that when i run "npm run build" or "pnpm build" it crawls the laravel project and gives me errors there so i can't compile. I have added /backend to the .npmignore but it doesn't ignore the folder.
Try
cding into the nextjs project. What's your directory structure?Dwarf CrocodileOP
Add folder to "exclude" tag in tsconfig.json
Answer