pyb4430 / full-stack-fastapi-postgresql

Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.
MIT License
125 stars 31 forks source link

docker-compose up -d fails with error "executor failed running [/bin/sh -c npm run build]: exit code: 1" #13

Open PhilippWu opened 1 year ago

PhilippWu commented 1 year ago

When starting docker-compose up -d the following error occours:

#0 31.20    75:1   error  Delete `␍`  prettier/prettier
#0 31.20    76:21  error  Delete `␍`  prettier/prettier
#0 31.20    77:54  error  Delete `␍`  prettier/prettier
#0 31.20    78:23  error  Delete `␍`  prettier/prettier
#0 31.20    79:45  error  Delete `␍`  prettier/prettier
#0 31.20    80:38  error  Delete `␍`  prettier/prettier
#0 31.20    81:6   error  Delete `␍`  prettier/prettier
#0 31.20    82:4   error  Delete `␍`  prettier/prettier
#0 31.20    83:1   error  Delete `␍`  prettier/prettier
#0 31.20    84:20  error  Delete `␍`  prettier/prettier
#0 31.20    85:25  error  Delete `␍`  prettier/prettier
#0 31.20    86:4   error  Delete `␍`  prettier/prettier
#0 31.20    87:1   error  Delete `␍`  prettier/prettier
#0 31.20    88:28  error  Delete `␍`  prettier/prettier
#0 31.20    89:58  error  Delete `␍`  prettier/prettier
#0 31.20    90:20  error  Delete `␍`  prettier/prettier
#0 31.20    91:14  error  Delete `␍`  prettier/prettier
#0 31.20    92:6   error  Delete `␍`  prettier/prettier
#0 31.20    93:1   error  Delete `␍`  prettier/prettier
#0 31.20    94:51  error  Delete `�� ERROR  Error: Build failed with errors.
#0 31.21 Error: Build failed with errors.
#0 31.21     at /app/node_modules/@vue/cli-service/lib/commands/build/index.js:207:23
#0 31.21     at /app/node_modules/webpack/lib/webpack.js:148:8
#0 31.21     at /app/node_modules/webpack/lib/HookWebpackError.js:68:3
#0 31.21     at Hook.eval [as callAsync] (eval at create (/app/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
#0 31.21     at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/app/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
#0 31.21     at Cache.shutdown (/app/node_modules/webpack/lib/Cache.js:150:23)
#0 31.21     at /app/node_modules/webpack/lib/Compiler.js:1225:15
#0 31.21     at Hook.eval [as callAsync] (eval at create (/app/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
#0 31.21     at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/app/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
#0 31.21     at Compiler.close (/app/node_modules/webpack/lib/Compiler.js:1218:23)
#0 31.21     at /app/node_modules/webpack/lib/webpack.js:147:16
#0 31.21     at finalCallback (/app/node_modules/webpack/lib/Compiler.js:441:32)
#0 31.21     at /app/node_modules/webpack/lib/Compiler.js:458:13
#0 31.21     at Hook.eval [as callAsync] (eval at create (/app/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:33:1)
#0 31.21     at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/app/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
#0 31.21     at onCompiled (/app/node_modules/webpack/lib/Compiler.js:456:21)
#0 31.21     at /app/node_modules/webpack/lib/Compiler.js:1196:17
#0 31.21     at eval (eval at create (/app/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:14:1)
#0 31.21     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
------
failed to solve: executor failed running [/bin/sh -c npm run build]: exit code: 1
ktnr commented 1 year ago

Works for me without problems out of the box.

PhilippWu commented 1 year ago

Works for me without problems out of the box.

Thanks that helped me al lot!

VickenM commented 1 year ago

yes, im getting this exact error too. help would be appreciated!

Edit: As a temporary solution, if all you need is the backend API and not the Vue frontend, I found you can disable the frontend steps and it should then work. I did this by just commenting out the "frontend" part in docker-compose.yml and docker-compose.override.yml. Or you can do the similar steps described in the README.md for "Removing the frontend".

but like I said, temp solution. dont know how to actually fix it.

JakubKubala commented 1 year ago

Hello, I fixed this error. In frontend/.prettierrc.js add to module.exports this line: endofline: "auto"

NurgisaA commented 1 year ago

Hello, yes it's working, but need write: endOfLine: "auto",

Warglaive commented 1 year ago

What worked for me is: In my windows machine, I solved this by adding the below code snippet in rules object of .eslintrc.js file present in my current project's directory. "prettier/prettier": [ "error", { "endOfLine": "auto" }, ],

Source

lizilong1993 commented 1 year ago

What worked for me is: In my windows machine, I solved this by adding the below code snippet in rules object of .eslintrc.js file present in my current project's directory. "prettier/prettier": [ "error", { "endOfLine": "auto" }, ],

Source

thanks, it worked for me