Error: Unexpected '!'. Escaping special characters with \ may help. - Preact build failing with no location
Preact production build is failing without giving any error location after additional chunk assets processing
Going after all '!' manually seems to be the only way I can think of right now!
nvm 12.18.3
ubuntu 20.04
npm run build
> cdms-app@0.0.1 build /home/technative/Documents/Projects/CrystalDevDocker/cdms-app
> preact build --no-prerender --dest public --esm --analyze --verbose
⚠ WARN Could not find sw.js in /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/src. Using the default service worker.
⚠ WARN /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/prerender-urls.json doesn't exist, using default!
Uh oh AssertionError [ERR_ASSERTION]: Unable to find a place to inject the manifest. Please ensure that your service worker file contains the following:/(\.precacheAndRoute\()\s*\[\s*\]\s*(\)|,)/
at Object._callee$ (/home/technative/Documents/Projects/CrystalDevDocker/cdms-app/node_modules/workbox-build/build/entry-points/inject-manifest.js:82:13)
at tryCatch (/home/technative/Documents/Projects/CrystalDevDocker/cdms-app/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/home/technative/Documents/Projects/CrystalDevDocker/cdms-app/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.<computed> [as next] (/home/technative/Documents/Projects/CrystalDevDocker/cdms-app/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/home/technative/Documents/Projects/CrystalDevDocker/cdms-app/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13 {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: null,
expected: true,
operator: '=='
}
Build [= ] 10% (1.4s) buildingNodent: Warning - noNodentExtensions option requires acorn >=v4.x. Extensions installed.
Build [= ] 12% (7.4s) building[BABEL] Note: The code generator has deoptimised the styling of /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/src/components/createvisitmodal/index.js as it exceeds the max of 500KB.
Build [= ] 15% (171.5s) building[BABEL] Note: The code generator has deoptimised the styling of /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/src/routes/siloAdministration/index.js as it exceeds the max of 500KB.
Build [= ] 15% (271.8s) building[BABEL] Note: The code generator has deoptimised the styling of /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/src/routes/caseDetail/index.js as it exceeds the max of 500KB.
Build [= ] 17% (289.7s) building[BABEL] Note: The code generator has deoptimised the styling of /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/node_modules/pdfmake/build/vfs_fonts.js as it exceeds the max of 500KB.
Build [== ] 40% (289.8s) building[BABEL] Note: The code generator has deoptimised the styling of /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/node_modules/pdfmake/build/pdfmake.js as it exceeds the max of 500KB.
Build [== ] 40% (377.0s) building[BABEL] Note: The code generator has deoptimised the styling of /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/src/components/semiDetailView/index.js as it exceeds the max of 500KB.
Build [====] 90% (487.8s) additional chunk assets processing[BABEL] Note: The code generator has deoptimised the styling of /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/src/components/createvisitmodal/index.js as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/src/routes/siloAdministration/index.js as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/src/routes/caseDetail/index.js as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/node_modules/pdfmake/build/pdfmake.js as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/node_modules/pdfmake/build/vfs_fonts.js as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /home/technative/Documents/Projects/CrystalDevDocker/cdms-app/src/components/semiDetailView/index.js as it exceeds the max of 500KB.
Build failed!
Error: Unexpected '!'. Escaping special characters with \ may help.