Node version: v16.15.1 (i tried 20+ earlier)
Repo:
https://github.com/CodeyPacker/payload-siteStitches Docs:
https://stitches.dev/docs/installationNote: I'm a noob with webpack and nodemon, but this runs fine if I don't make any changes.
Any help would be great, trying to demo the product for the company I work for.
I'm using the Website Template and would like to switch the styling to use stitches. The only change I've made so far is adding in the
stitches.config.ts
in the root and installed the package.
After a few minutes, I start getting below error in the terminal. I've tried clearling out node_modules, yarn.lock, etc and doing fresh builds, but no luck.
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] starting `ts-node src/server.ts -- -I`
failed to initialize npmlog this hasn't been initialised - super() hasn't been called
info buildHook-11043 installing build hook for webpack at /users/cody/projects/payload-site, node v16.15.1
info buildHook-11043 allowed tools: vite, jest, webpack, next.js, cypress, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, node
info buildHook-11043 running tools: webpack
info buildHook-11043 installing fs interceptor
info buildHook-11043 file processed (stat): 0 log points, error handler: false
info buildHook-11043 file processed (stat): 0 log points, error handler: false
finfo buildHook-11043 allowed tools: vite, jest, webpack, next.js, cypress, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, node
info buildHook-11043 running tools: webpack
info buildHook-11043 build hook already installed
info buildHook-11043 updating build hook tool
Am I missing something here? Is this a known issue that’s already being worked on?
@1032341301619871785
If I can get this working, I can demo this at work because we need to switch up our tech stack. Any ideas?
Hey I have no idea what is going on here to be honest with you. I want to help, if you can make a reproduction in a new repo I could take a look. If you have to add me. I am user: DanRibbens on GitHub.
Oh nvm you did link your repo
I'll check it out.
Thanks Dan
Weird. I pulled down the repo in another directory to test while you are as well. The server starts and then give me a bunch these sass-loader errors
Idk if this helps debug, but I'm using an M1 mac and yarn
Even if I remove stitches from the package.json and remove the
stitches.config.ts
in the root, reinstall dependencies, I'm getting the same errors.
Oh no... I just tried it on an Intel Mac and it's working.
I didn't think we were having any more trouble with Apple silicone. Shit, it's been a few years now.
Hmmm. I tried making a change in the code and now were back to the
[nodemon] restarting due to changes...
, so that may have been a false alarm
All I did was duplicate the CallToAction Block as "SplitContent" and added it to the
src/payload/collection/Pages/index.ts
file as one of the "blocks"
I hope it's all good. I guess open an issue if you have something reproducible we can and fix.
When you ran it locally it was fine?
I didn't get a chance to run it yet.
It's 10pm here for me. Tomorrow Dan can deal with it
I just pushed up the (hopefully reproducible) error.
No worries! I've got the next 6 weeks off for paternity leave, so no rush.
Just don't forget about me 😉
Congrats!
Thanks!
Let's ignore this for now. I switched to npm from yarn and it seems to be fine. (swear I tried it before, but it hadn't worked)
Hi I have the same issue : /
even I do not made any changes
Hey
@362790184820932611to clarify - are you using the Payload Website as a template (
https://github.com/payloadcms/website-cms), or our website template (
https://github.com/payloadcms/payload/tree/main/templates/website)?I don't have access to your repo so I couldn't validate, but I spun this up on my M3, used our website template, yarn added stitches, and created a stitches config file and everything is working as expected. If you can give me access to your repo I can test this with yours specifically. Same question for you
@1192377228441428039which template are you using?
Hi
@364562745447940099
Thanks for the answer. I use
https://github.com/payloadcms/payload/tree/main/templates/website
after install using method 2 „npx create-payload-app@latest my-project -t website”
first app run correctly, but after small chagne in 'src/payload/payload.config.ts'
I add only
localization: {
locales: ['en', 'es', 'de'],
defaultLocale: 'en',
fallback: true,
},
or even I don’t change anything and re run „yarn dev / npm run dev”
I get loop of
"[nodemon] restarting due to changes...
[nodemon] starting
ts-node src/server.ts -- -I
failed to initialize npmlog this hasn't been initialised - super() hasn't been called
info buildHook-15559 installing build hook for webpack at /users/xxxx/xxx/, node v20.10.0
info buildHook-15559 allowed tools: vite, angular, jest, webpack, next.js, nest.js, cypress, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, node
info buildHook-15559 running tools: webpack
info buildHook-15559 installing fs interceptor
info buildHook-15559 allowed tools: vite, angular, jest, webpack, next.js, nest.js, cypress, http-server, serve, live-server, nuxt, remix, qwik, hydrogen, serverless, astro, node
info buildHook-15559 running tools: webpack
info buildHook-15559 build hook already installed
info buildHook-15559 updating build hook tool
[nodemon] restarting due to changes..."
Node v 20.10.0
npm 10.2.3
yarn 1.22.21
this i story of this issue
after red arrow nodemon constant restarting app
I can check which repo I used a bit later, thanks for the response.
@1192377228441428039I started using Docker instead to spin it up and that has been working for me so far
I’m using the website template (second link)
https://github.com/payloadcms/payload/tree/main/templates/websiteHi
@364562745447940099any idaes?
Hey Ralph - I'll dig into this further today
Great. Thanks\
Hi, ping
@364562745447940099Hey
@1192377228441428039what version of node are you on?
I just did a fresh npx create-payload-app, node v16..15.1, and ran yarn dev, got my first user screen, created a user and can add, delete content, not seeing any issues on my end.
I have 20,0 version
I will try with 16.15.1
The same issue
hmmm...interesting, and you haven't even changed any code?
what kind of computer are you using?
I have found that this issue still exists. It happens whether I use the website template or creating a CMS from scratch. I have been able to fix this with the website template by adding
"src/server.ts", "src/server.default.ts", "src/payload/payload.config.ts"
to the ignore array in the
nodemon.json
. I have not been able to trace what is changing in any of those three files that causes nodemon to restart. I've been playing around, changing files throughout the CMS and have not found any issues so far with those files ignored. Note: I have not gone back to the CMS from scratch to test. Does anyone from the team see a reason why ignoring those three files would cause an issue down the line?
I could create a PR for this but it feels more like a band-aid to a larger issue.
Star
Discord
online
Get dedicated engineering support directly from the Payload team.