Shelljs invoke build fix CloudFlare Pages build not work with Nuxt.js

My issue: Nuxt Generate fails on Cloudflare Pages to build
"nuxt": "2.3.4"
Cloudflare Pages env: nodejs v14 version

npm scripts: "nuxt generate" not work in Cloudflare Pages build

I cannot see any nuxt error log

npm scripts all invoked finished, it looks like everything OK, but I cannot see /dist *.html files.



I try many way to fix this issue...

the last way, I resolve this issue:
using shelljs invoke npm scripts build flow.

nake new file: /build/build.js

var shell = require('shelljs');

shell.exec('pwd')
shell.exec('ls')

shell.exec('npm run generate')
shell.exec('ls')

shell.exec('node build/build-info.js')
// shell.exec('node build/oss-upload/oss-upload.js')
shell.exec('npm run upload-oss')

shell.exec('cd dist')
shell.exec('ls')

package.json info:
"shelljs": "0.8.5",
"nuxt": "2.3.4" (vue SSR framework)

the end, Shelljs invoke build cli resolved CloudFlare Pages build error with nuxt.
maybe this way can fix other Cloudflare Pages build error.

CloudFlare Pages build system env has many issue.
Github Actions is a better CICD choice.
aha... Life is short...

more info:
  Nuxt Generate fails on Cloudflare Pages
  https://stackoverflow.com/questions/72587107/nuxt3-deployment-with-cloudflare-pages-failed
  https://stackoverflow.com/questions/73939760/nuxt-generate-fails-on-cloudflare-pages-to-build
  https://github.com/nuxt/nuxt/issues/21768
  https://stackoverflow.com/questions/77581160/cloudflare-bindings-with-nuxt