Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Error trying to run Payload in dev mode locally

default discord avatar
augdustlast year
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
    lascopalast year

    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
    steadysnaillast year

    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.

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.