wunderio / next-drupal-starterkit

Next.js for Drupal multilingual template by Wunder
https://next-drupal-starterkit.dev.wdr.io
GNU General Public License v2.0
82 stars 17 forks source link

ddev setup-ddev.sh failing #238

Open arttus opened 1 month ago

arttus commented 1 month ago

I got this error when running setup-ddev.sh

Error: ENOENT: no such file or directory, open '/tmp/.drupal-access-token.txt' at Object.readFileSync (node:fs:448:20) at /var/www/html/next/codegen.ts:8:27 at evalModule (/var/www/html/next/node_modules/jiti/dist/jiti.js:1:247313) at jiti (/var/www/html/next/node_modules/jiti/dist/jiti.js:1:245241) at loadTypeScript (/var/www/html/next/node_modules/graphql-config/cjs/helpers/cosmiconfig.js:39:12) at #loadConfiguration (/var/www/html/next/node_modules/cosmiconfig/dist/Explorer.js:92:30) at #readConfiguration (/var/www/html/next/node_modules/cosmiconfig/dist/Explorer.js:77:80) at async load (/var/www/html/next/node_modules/cosmiconfig/dist/Explorer.js:20:48) at async Explorer.load (/var/www/html/next/node_modules/cosmiconfig/dist/Explorer.js:23:20) at async getConfig (/var/www/html/next/node_modules/graphql-config/cjs/helpers/get-config.js:9:17) at async loadConfig (/var/www/html/next/node_modules/graphql-config/cjs/config.js:28:15) at async findAndLoadGraphQLConfig (/var/www/html/next/node_modules/@graphql-codegen/cli/cjs/graphql-config.js:35:20) at async loadContext (/var/www/html/next/node_modules/@graphql-codegen/cli/cjs/config.js:79:27) at async createContext (/var/www/html/next/node_modules/@graphql-codegen/cli/cjs/config.js:190:21) at async runCli (/var/www/html/next/node_modules/@graphql-codegen/cli/cjs/cli.js:37:21) { errno: -2, code: 'ENOENT', syscall: 'open', path: '/tmp/.drupal-access-token.txt', filepath: '/var/www/html/next/codegen.ts' } Failed to run npm run build: exit status 1 ❌ Command cd next && ddev npm run build failed.

vermario commented 1 month ago

hi! thanks for pointing this out.

I tried now to run the ddev setup locally but I was not able to replicate the issue, the script went though normally.

I am using ddev version v1.23.4 on a Mac.

Are you using some other version?

you can try to run the script again with the -c argument, that will start from scratch

./setup-ddev.sh -c

arttus commented 4 weeks ago

yeah running with -c was able to get through the install

JordiBustos commented 3 weeks ago

I'm encountering the same issue on Ubuntu 24 with DDEV v1.23.4. Running ./setup-ddev.sh -c didn't resolve it. However, I found that replacing https with http in the default process.env.NEXT_PUBLIC_DRUPAL_BASE_URL seems to work. I'm not entirely sure why this solved the issue, but the change can be made in the .ddev/config.yml file.

vermario commented 3 weeks ago

@JordiBustos ah! then I suspect you might want to look into this: https://ddev.com/blog/ddev-local-trusted-https-certificates

JordiBustos commented 3 weeks ago

Yeah! I followed the steps provided with a clean install and it worked. Thank you!

vermario commented 2 weeks ago

great! :)