javascript_is_wack
javascript_is_wack
CDCloudflare Developers
Created by javascript_is_wack on 4/25/2025 in #pages-help
Unable to Deploy Unless using CLI Deploy
Hello. I'm able to run and even deploy my app when building locally (e.g. npx wrangler pages . and npx wrangler pages deploy .). However, the automatic deploys runs into an error after build and during deploy due to an error from one of the NPM node_modules. I think it's due to process.stderr being accessed improperly or being polyfilled improperly by unenv. However, I don't see a way to access the build artifacts that cloudflare creates and so cannot debug this issue. Any help would be appreciated. Thank you. Removed the other details as I've figured out a workaround. See first response. Error:
14:19:17.224 ✨ Upload complete!
14:19:20.535 Success: Assets published!
14:19:21.617 Error: Failed to publish your Function. Got error: Uncaught TypeError: Cannot convert object to primitive value
at functionsWorker-0.5057992545540486.js:9620:101 in isEnabled
at functionsWorker-0.5057992545540486.js:9623:35 in refresh
at functionsWorker-0.5057992545540486.js:9665:13 in ../node_modules/google-logging-utils/build/src/colours.js
at functionsWorker-0.5057992545540486.js:25:50 in __require
at functionsWorker-0.5057992545540486.js:9721:21 in ../node_modules/google-logging-utils/build/src/logging-utils.js
at functionsWorker-0.5057992545540486.js:25:50 in __require
at functionsWorker-0.5057992545540486.js:9986:18 in ../node_modules/google-logging-utils/build/src/index.js
at functionsWorker-0.5057992545540486.js:25:50 in __require
at functionsWorker-0.5057992545540486.js:10034:18 in ../node_modules/gcp-metadata/build/src/index.js
at functionsWorker-0.5057992545540486.js:25:50 in __require
14:19:17.224 ✨ Upload complete!
14:19:20.535 Success: Assets published!
14:19:21.617 Error: Failed to publish your Function. Got error: Uncaught TypeError: Cannot convert object to primitive value
at functionsWorker-0.5057992545540486.js:9620:101 in isEnabled
at functionsWorker-0.5057992545540486.js:9623:35 in refresh
at functionsWorker-0.5057992545540486.js:9665:13 in ../node_modules/google-logging-utils/build/src/colours.js
at functionsWorker-0.5057992545540486.js:25:50 in __require
at functionsWorker-0.5057992545540486.js:9721:21 in ../node_modules/google-logging-utils/build/src/logging-utils.js
at functionsWorker-0.5057992545540486.js:25:50 in __require
at functionsWorker-0.5057992545540486.js:9986:18 in ../node_modules/google-logging-utils/build/src/index.js
at functionsWorker-0.5057992545540486.js:25:50 in __require
at functionsWorker-0.5057992545540486.js:10034:18 in ../node_modules/gcp-metadata/build/src/index.js
at functionsWorker-0.5057992545540486.js:25:50 in __require
2 replies