Hi, when I go to create a new custom type or page type I get the green bar that says it was saved. When I go to push, it does not work and then gives me the below error in the terminal Then the type is no longer visible.
Error: Could not find model test
Is this a new project? How did you start the project? Are you using prettier-plugin-tailwindcss? I ask because I've found that it caused similar issues. Hope I can help.
I actually just went ahead and tried deleting the prettier pluggin tailwind css because of an error in the console. I deleted the node modules folder and package.lock and am reinstalling deps now. Were you able to find a way to use the plugin?
@nf_mastroianni OK, so the above did not fix the issue. It is a new project. I am testing out Prismic and am following a tutorial put out by the Prismic team.
Can you paste your package.json?
Also, which slice-machine version are you on?
Also, I've been getting weird build/dev bugs that I believe are Next related and not Prismic. So I find myself running:
rm -rfv ./.next && bun dev
I'm using bun but sub yarn or npm as needed.
@nf_mastroianni NVM. I had forgotten to delete my prettier.config.js which was pointing to the plugin.
This issue is now resolved. I can create types and pages.
Do you have a solution for using the prettier tailwind plugin?
Sadly, no. I'm presently living without. My tips would be to disable it while you're making slice/custom type/page type changes. Once you're done with that phase, enable it and it shouldn't be a problem.
Also... please mark the solution when you're ready so that people know what worked. ;)
Good Idea. Is there a quick way to disable and enable?
No quick way that I know of. I just edit my .prettierrc file when I'm ready to enable it. Commenting out the line either does not work. Stinky all the way through.
Do you use Prismic in production? Do you like it? I am trying to steer my the agency I work for away from WP. I need to build a case for why we should change.
I am very much in favor of this CMS. I have tried several others, and once I discovered this, I haven't gone elsewhere. Convincing higher-ups to ditch Wordpress might be a challenge, but it's really hard when you talk to the tech people who know how entrenched you really are in the ecosystem. It's easy to build a sloppy mess of URLs in a Wordpress site.
Ironically, as forum post I just made and then answered myself was an attempt to mimic Wordpress' tag taxonomy using Prismic. I was driving the struggle bus quite a bit, but now I'm happy with my results.
Yes, I use this for production sites. My projects are pretty low-stakes though.
What kind of lighthouse scores are you getting on your current WP site?
For me, the case would be performance and security.
74 and 80 for performance on two that i just checked.
I am biased because I learned in the React ecosystem and this is the first job I have had. Thought learning WP would be less painful but I really do not like it. Learned a lot though so I can not complain.
I started a job (not coding) about a year ago and I have to live in the WP ecosystem as an extremely limited (permissions) content editor. Oy! I can't imagine having to go back to coding WP. The thought makes me very uneasy. Well, I wish you luck in your attempt to convert the team. I really like Next + Prismic. It's been my go-to combo now for over a year.
74 and 80 really aren't bad for WP. That's surprising.
Yea the Lead Dev really knows what he is doing. Its kinda cool. Oh well at least I have a job!
Thanks so much for sharing this issue, garrett, and thanks for your solution, Neil
This is a known issue in Slice Machine:
If you'd like, you can add a bug report to that GitHub thread to help the team debug the issue. Otherwise, feel free to subscribe to the thread to get an update when the team finds a solution.