I encountered a problem related to WordPress Gutenberg blocks.
Created custom Gutenberg blocks on a local server. Assembling webpack, that’s all. On the local server everything works and everything is visible, but when everything is uploaded to the server, the blocks stop working and give an error:
Uncaught TypeError: external_wp_blocks_namespaceObject is undefined
I went further and decided that the problem was in my assembly. Installed @wordpress/create-block
And, without rewriting anything, I compiled the block and uploaded the zip to the server. It is not visible on the server. On the local machine everything works fine.
Question is, are there any additional dependencies required for the server to support Gutenberg blocks?
I changed the version of php and wordpress and installed the one that is on the local machine. Everything matches. It’s just that everything works on the local machine, but not on the server. Moreover, I tried it on 2 servers, it doesn’t work on both.
Maybe you need to additionally install Node or, as a last resort, webpack on the server?
Or maybe there is a problem with some access? Because all things i do DO work on local server but not on remote server.
Islamus WiseFool is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.