-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apostrophe Marketing + cusom-code-editor-a3 causes 404 in production build #15
Comments
Guys any update on above one |
Hi @karthick-rs-webdev , sorry for the late response. As I was go through your process, I found a problem that may be similar to yours. I found the difference between setting Try put NODE_ENV=production npm run build Let me know if it works... P/s: If it works, I should update my README to include |
@ammein Thanks for getting back to me. I tried to build the project in two different ways, but unfortunately, the problem still exists.
However, the issue persists. |
Could you remove the apos-build folder and run:
|
I removed apos-frontend, then I ran To gain more clarity:
Still getting 404 error. |
Hmmm, weird. Could you share your project here? |
@ammein i can't share my project here, since it's under development. but you can spin up a simple apostrophecms-marketing site with cusom-code-editor-a3. On production build you can get this error. |
I've been working with the ApostropheCMS marketing starter kit and added the custom-code-editor-a3 package to meet the specific requirements of my project. Everything functions correctly in the development build. However, when i run to the production build, I'm getting 404 errors in the browser console.
Understanding the Build Process in ApostropheCMS
In ApostropheCMS, executing the
npm run build
command initiates the creation of a new folder withinpublic/apos-frontend/releases
. This folder is named with a randomly generated alphanumeric string (often referred to as the release ID), and it is where all assets for the production environment are directed. ReferenceHowever, when running the production build with this package, it triggers a 404 error in the console. Removing this package from
app.js
and rebuilding for production resolves the issueMy
app.js
modules/custom-code-editor-a3/index.js
I tried to tweak the webpack as mentioned below
clean
cleanRelease
clean does nothing and cleanRelease throws below error when running the build command
Thank you in advance, and any assistance would be greatly appreciated.
The text was updated successfully, but these errors were encountered: