Error trying to run Payload in dev mode locally

default discord avatar
augdust
2 weeks ago
2

Hey yall! I'm brand new to Payload, and at the moment I'm trying to get a basic project up and running. I am following the "Installation" steps on the website, but I am getting this error when I'm trying to run my project via "npm run dev":



ERROR in ./node_modules/set-function-name/index.js 5:37-99
Module not found: Error: Can't resolve 'functions-have-names' in '/Users/%username%/Documents/%project%/node_modules/set-function-name'

webpack compiled with 1 error


It connects to the mongodb-server successfully, this error happens right after the db connection has completed.



I have tried two times and gotten the same result both times. My procedure is as follows:



1. run 'npx create-payload-app'


2. choose 'Blank template'


3. run 'npm install'


4. run 'npm run dev'

  • default discord avatar
    lascopa
    2 weeks ago

    Hey there 👋 Seems like there is an issue with that module as stated here ->

    https://github.com/ljharb/set-function-name/issues/1

    You can get around the issue temporarily by adding the package manually ->

    npm i -D functions-have-names

    (Make sure to use

    yarn or pnpm

    depending on how your are managing modules)

  • default discord avatar
    steadysnail
    2 weeks ago

    The issue with "set-function-name" was solved by its maintainer. There isn't a need for any additional actions, it should work fine if you try to deploy again.

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.