full-stack-fastapi-postgresql icon indicating copy to clipboard operation
full-stack-fastapi-postgresql copied to clipboard

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

Open PhilippWu opened this issue 3 years ago • 7 comments

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

PhilippWu avatar Nov 01 '22 17:11 PhilippWu

Works for me without problems out of the box.

ktnr avatar Nov 03 '22 11:11 ktnr

Works for me without problems out of the box.

Thanks that helped me al lot!

PhilippWu avatar Nov 03 '22 17:11 PhilippWu

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.

VickenM avatar Nov 07 '22 03:11 VickenM

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

JakubKubala avatar Nov 22 '22 09:11 JakubKubala

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

NurgisaA avatar Jan 24 '23 19:01 NurgisaA

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

Warglaive avatar Mar 13 '23 10:03 Warglaive

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

lizilong1993 avatar Mar 15 '23 09:03 lizilong1993