-
Bug ReportI followed the quickstart instructions on https://payloadcms.com/docs/getting-started/installation cd payload-cms npm install node server.js` where the directory name is payload-cms but get an error: `$ node server.js Error: Cannot find module 'C:\Users.............\payload-cms\server.js' node version: v16.16.0 I am on Windows, using powershell or gitbash |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think you're probably mixing up instructions from The Node error you're seeing is because Node can't find your This is not an issue with Payload though, per se. So I'll convert this to a discussion, but we're happy to continue to help here! |
Beta Was this translation helpful? Give feedback.
I think you're probably mixing up instructions from
npx create-payload-app
and manual install. If you've usednpx create-payload-app
, you will not need to runnode server.js
, and rather, you should runnpm run dev
oryarn dev
.The Node error you're seeing is because Node can't find your
server.js
file. It will look in the folder that you're currently in. So for example,npx create-payload-app
will create a/src
directory, and your server will actually be in that folder instead—which will explain why Node can't find it in the root folder. Runningyarn dev
ornpm run dev
should resolve this.This is not an issue with Payload though, per se. So I'll convert this to a discussion, but we're ha…