Skip to content

Unable to deploy in Netlify #1162

Answered by h-enk
torvenkat asked this question in Guides
Jan 6, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

I noticed you're missing a bunch of files in your project root.

One is critical — add .npmrc containing:

enable-pre-post-scripts = true
auto-install-peers = true
node-linker = hoisted
prefer-symlinked-executables = false

You should also add a .gitignore containing something like:

.eslintcache
.stylelintcache
.netlify
.hugo_build.lock
yarn-error.log
node_modules
public
resources

And, make sure to run a local build and push the generated hugo_stats.json to your repository.

That should do it!

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@torvenkat
Comment options

@h-enk
Comment options

Answer selected by torvenkat
@torvenkat
Comment options

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