Hi. Payload doesn't seem to be starting up? Attached is a screen vid.
Hey! Could you also paste all error messages in here - just to increase searchability of this thread?
Also, when did the issue start happening? After which change?
Hey Alessio. Thanks.
the server responded with a status of 404 (Not Found)
I assume that error is because the server hasn't started up fully.
The last change I remember making is renaming a .ts block component file to .tsx so I can use React.
This error has happened a few times in the past with this project.
Payload hanging? Nextjs " the server responded with a status of 404 (Not Found)"
It's happening again for a different project.
It seems to happen when I run yarn dev when Payload is already running. I'm trying to refresh the server. Is there a better way?
yarn run v1.22.19
$ ts-node server.ts
[10:19:40] INFO (payload): Connected to Mongo server successfully!
[10:19:40] INFO (payload): Starting Payload...
info - Loaded env from C:\git\2160\Bukela-Lodge\.env
webpack built ab85e2c50143441f965d in 22830ms
webpack compiled successfully
<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: No serializer registered for ConcatSource
<w> while serializing webpack/lib/util/registerExternalSerializer.webpack-sources/ConcatSource -> Array { 2 items } -> ConcatSource
I tried updating Next and received this error:
PS C:\git\2160\Bukela-Lodge> yarn add next@latest react@latest react-dom@latest eslint-config-next@latest
yarn add v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "payload > @monaco-editor/react@4.4.6" has unmet peer dependency "monaco-editor@>= 0.25.0 < 1".
warning "payload > express-graphql@0.12.0" has incorrect peer dependency "graphql@^14.7.0 || ^15.3.0".
warning "payload > react-diff-viewer@3.1.1" has incorrect peer dependency "react@^15.3.0 || ^16.0.0".
warning "payload > react-diff-viewer@3.1.1" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0".
warning "payload > react-select@3.2.0" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning "payload > react-select@3.2.0" has incorrect peer dependency "react-dom@^16.8.0 || ^17.0.0".
warning "payload > use-context-selector@1.4.1" has unmet peer dependency "scheduler@>=0.19.0".
warning "payload > @monaco-editor/react > @monaco-editor/loader@1.3.2" has unmet peer dependency "monaco-editor@>= 0.21.0 < 1".
warning "payload > react-helmet > react-side-effect@2.1.1" has incorrect peer dependency "react@^16.3.0 || ^17.0.0".
warning "payload > react-select > react-input-autosize@3.0.0" has incorrect peer dependency "react@^16.3.0 || ^17.0.0".
warning " > @trbl/eslint-config@1.2.4" has incorrect peer dependency "eslint-plugin-jest-dom@^2.0.0".
warning " > eslint-plugin-react-hooks@2.5.1" has incorrect peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0".
warning " > ts-node@10.8.1" has unmet peer dependency "@types/node@*".
error An unexpected error occurred: "EPERM: operation not permitted, unlink 'C:\\git\\2160\\Bukela-Lodge\\node_modules\\@next\\swc-win32-x64-msvc\\next-swc.win32-x64-msvc.node'".
info If you think this is a bug, please open a bug report with the information provided in "C:\\git\\2160\\Bukela-Lodge\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Hey @taun2160 were you able to resolve this? or still getting this error?
Hey Jess. I think I created a new repo so all good for now thanks. I think that error usually occurs when I have Payload open in the browser and try restart the server... I don't know.
Hi @jesschow . The error is happening again:
[11:28:10] INFO (payload): Connected to Mongo server successfully!
[11:28:10] INFO (payload): Starting Payload...
info - Loaded env from C:\git\White_Polaroids\WhitePolaroids4\.env
event - compiled client and server successfully in 5.3s (160 modules)
uncaughtException [Error: EPERM: operation not permitted, open 'C:\git\White_Polaroids\WhitePolaroids4\.next\trace'] {
errno: -4048,
code: 'EPERM',
syscall: 'open',
path: 'C:\\git\\White_Polaroids\\WhitePolaroids4\\.next\\trace'
}
error Command failed with exit code 1.
The first time I start up the server it's fine, but when I make a change and run the server again it returns the error. Is there a way to kill the server?
What do you suggest?
to load resource: the server responded with a status of 404 (Not Found)
error displaying in console repeatedly
And this is local development? Have you tried to trim down your project in any way to attempt to debug?
Yes, it happens just after starting a fresh clone of Next-custom-server. It occurs when I try to restart the server. Is there a way to kill the server?
Here's a vid showing what happens. Strangely, this time it gave the EPERM error but still seemed to render, but when I go into console it shows a 404 error.
Usually the Payload pages don't load and it returns the console error of 404 and the browser returns an error of "error loading components" or something to that effect.
I assume it's showing the old content and isn't updating the server. If I had made changes it may have returned the error 'missing components'
@taun2160 do you still need help on this issue?
Thanks Jess. All good, thanks.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.