I set the node environment to the one I used on my local system.
That helped a bit. I have moved on to other errors now.
7:48:18 PM: [success] [webpackbar] Client: Compiled successfully in 7.71s
7:48:18 PM: wait Rendering static HTML...
7:48:18 PM: success Generated static files in src/.vuepress/dist.
7:48:18 PM: Done in 9.10s.
7:48:18 PM:
7:48:18 PM: (build.command completed in 9.2s)
7:48:18 PM: Build step duration: build.command completed in 9290ms
7:48:18 PM:
7:48:21 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
7:48:21 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
7:48:21 PM: Failing build: Failed to build site
7:48:22 PM: Finished processing build request in 37.49s
I set NETLIFY_BUILD_DEBUG to TRUE and changed my yarn command on package.json and the Netlify config from yarn build
to yarn docs:build
following advice from [Support Guide] Frequently encountered problems during builds but I can’t get it to build without an error.
My package.json contents (email changed) is:
{
"name": "darty-docs",
"version": "0.0.1",
"description": "Documentation for Darty Ai",
"main": "index.js",
"authors": {
"name": "Trevor",
"email": "*****@******.com"
},
"repository": "/Darty-Docs",
"scripts": {
"dev": "vuepress dev src",
"docs:build": "vuepress build src",
"b": "vuepress build src",
"bd": "vuepress build src && vuepress dev src",
"index": "node -e \"require('../build-code/test-script.js').default()\""
},
"license": "MIT",
"devDependencies": {
"vuepress": "^1.5.3",
"vuepress-plugin-fulltext-search": "^2.2.1"
},
"dependencies": {
"@vuepress/plugin-back-to-top": "^1.9.9",
"@vuepress/plugin-medium-zoom": "^1.9.9"
}
}
The build is Netlify App
Please can you give me some more guidance?