Closed sctgraham closed 3 months ago
I am running into this today too.
@sctgraham @aaronmarkle Are these brand new projects created from the interface or pre-existing projects just now seeing issues on recent deployments?
@denolfe the latter : It was a local install that was configured and then pushed to the payload cloud. However, I was happily pushing changes without issue until today.
Looks like there may have been some behavior changes in DO's platform: https://docs.digitalocean.com/products/app-platform/reference/buildpacks/nodejs/#specifying-devdependencies
You might need to follow these steps and change your build command in your Payload Cloud Dashboard to be the one defined.
This is just a workaround, we are actively working with them on a long-term solution.
I swapped out 'copyfiles' with 'rsync' temporarily and named the npm command 'syncfiles'. Rsync comes pre-installed on most Linux distributions, simplifying the process.
"syncfiles": "rsync -ru --include='*/' --include='*.html' --include='*.css' --include='*.scss' --include='*.ttf' --include='*.woff' --include='*.woff2' --include='*.eot' --include='*.svg' --include='*.jpg' --include='*.png' --include='*.js' --exclude='*' src/ dist/",
The build script needs to be updated:
"build": "cross-env NODE_ENV=production yarn build:payload && yarn build:server && yarn syncfiles && yarn build:next",
@denolfe yup that's it ! Thanks for that. This worked like a charm @kaptankorkut, many thanks. I'm now running into the issue described in #6062 and unfortunately the solution described there isn't working for me, bummer !
I swapped out 'copyfiles' with 'rsync' temporarily and named the npm command 'syncfiles'. Rsync comes pre-installed on most Linux distributions, simplifying the process.
"syncfiles": "rsync -ru --include='*/' --include='*.html' --include='*.css' --include='*.scss' --include='*.ttf' --include='*.woff' --include='*.woff2' --include='*.eot' --include='*.svg' --include='*.jpg' --include='*.png' --include='*.js' --exclude='*' src/ dist/",
The build script needs to be updated:
"build": "cross-env NODE_ENV=production yarn build:payload && yarn build:server && yarn syncfiles && yarn build:next",
Link to reproduction
No response
Describe the Bug
My build on payload cloud is failing due to the
copyfiles
command. However, the dependency is installed and the yarn command is running fine locally.Thanks for any help on this ...
To Reproduce
This happened after upgrading my package dependencies. This is the payload cloud log output :
Here are my package dependencies and scripts :
Payload Version
2.14.1
Adapters and Plugins
bundler-webpack, db-mongodb, plugin-cloud, plugin-redirects, plugin-seo, richtext-lexical