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'
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 useyarn or pnpm
depending on how your are managing modules)
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.