I didnβt change anything in my config. Builds still work fine locally. They just suddenly started failing on April 19. My netlify.toml
and package.json
files are below.
Please, how can I fix this?
My netlify.toml
:
[build]
publish = "public"
functions = "functions"
[functions]
node_bundler = "esbuild"
external_node_modules = ["node-mailjet"]
[build.environment]
NODE_VERSION = "18.12.1"
NPM_VERSION = "8.19.2"
HUGO_VERSION = "0.123.7"
[context.production]
command = "npm run build"
[context.deploy-preview]
command = "npm run build -- -b $DEPLOY_PRIME_URL"
[context.branch-deploy]
command = "npm run build -- -b $DEPLOY_PRIME_URL"
[context.next]
command = "npm run build"
[context.next.environment]
HUGO_ENV = "next"
[[plugins]]
package = "netlify-plugin-submit-sitemap"
[plugins.inputs]
baseUrl = "https://mysite.netlify.app/"
sitemapPath = "/sitemap.xml"
ignorePeriod = 0
providers = [
"google",
"yandex"
]
[dev]
framework = "#custom"
command = "npm run dev"
targetPort = 1313
port = 8888
publish = "public"
autoLaunch = false
# Redirects and rewrites β https://docs.netlify.com/routing/redirects/#syntax-for-the-netlify-configuration-file
# Custom headers β https://docs.netlify.com/routing/headers/#syntax-for-the-netlify-configuration-file
[[headers]]
for = "/*"
[headers.values]
Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"
X-Content-Type-Options = "nosniff"
X-XSS-Protection = "1; mode=block"
# Content-Security-Policy = "default-src 'self'; manifest-src 'self'; connect-src 'self'; font-src 'self'; img-src 'self' data:; script-src 'self' 'unsafe-eval' 'unsafe-inline' identity.netlify.com unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js; style-src 'self' 'unsafe-inline' identity.netlify.com"
X-Frame-Options = "SAMEORIGIN"
Referrer-Policy = "strict-origin"
Feature-Policy = "geolocation 'self'"
Cache-Control= '''
public,
max-age=31536000'''
Access-Control-Allow-Origin = "*"
# Shorter cache for HTML files to ensure fresher content for users
[[headers]]
for = "/*.html"
[headers.values]
Cache-Control = "public, max-age=600" # 10 minutes caching for HTML files
And my package.json
:
{
"name": "mysite",
"version": "0.0.0",
"description": "Hyas Tailwind CSS starter with recommended integrations",
"author": "Hyas",
"license": "MIT",
"scripts": {
"dev": "exec-bin node_modules/.bin/hugo/hugo server --bind=0.0.0.0 --disableFastRender --baseURL=http://localhost --noHTTPCache",
"dev:drafts": "exec-bin node_modules/.bin/hugo/hugo server --bind=0.0.0.0 --disableFastRender --baseURL=http://localhost --noHTTPCache --buildDrafts",
"create": "exec-bin node_modules/.bin/hugo/hugo new",
"lint": "npm run lint:scripts && npm run lint:styles && npm run lint:markdown",
"lint:scripts": "eslint --cache config",
"lint:styles": "stylelint --cache \"assets/css/**/*.{css,sass,scss}\"",
"lint:markdown": "markdownlint-cli2 \"*.md\" \"content/**/*.md\"",
"test": "echo \"Error: no test specified\" && exit 1",
"build": "exec-bin node_modules/.bin/hugo/hugo --cleanDestinationDir --minify",
"preview": "http-server --gzip --brotli --ext=html --cors",
"clean": "npm run clean:build && npm run clean:lint && npm run clean:install",
"clean:build": "shx rm -rf public resources .hugo_build.lock hugo_stats.json",
"clean:install": "shx rm -rf node_modules package-lock.json yarn.lock pnpm-lock.yaml",
"clean:lint": "shx rm -rf .eslintcache .stylelintcache",
"preinfo": "npm version",
"info": "npm list",
"postinfo": "exec-bin node_modules/.bin/hugo/hugo version",
"postinstall": "hugo-installer --version otherDependencies.hugo --extended --destination node_modules/.bin/hugo"
},
"dependencies": {
"@glidejs/glide": "^3.6.0",
"@hyas/images": "^3.1.0",
"@hyas/seo": "^2.2.0",
"@hyas/tailwindcss": "^1.0.3",
"@netlify/functions": "^2.0.2",
"@tabler/icons-png": "^2.34.0",
"axios": "^1.4.0",
"flexsearch": "^0.7.31",
"gethyas": "^2.2.2",
"glightbox": "^3.2.0",
"hugo-installer": "^4.0.1",
"leaflet": "^1.9.4",
"leaflet-gesture-handling": "^1.2.2",
"leaflet.markercluster": "^1.5.3",
"netlify-identity-widget": "^1.9.2",
"node-fetch": "^2.7.0"
},
"devDependencies": {
"shx": "^0.3.4"
},
"otherDependencies": {
"hugo": "0.123.7"
},
"overrides": {
"semver": "^7.5.4"
},
"engines": {
"node": ">=18.14.1",
"pnpm": ">=8.10.0"
},
"packageManager": "pnpm@8.12.0"
}