qrcode2stl icon indicating copy to clipboard operation
qrcode2stl copied to clipboard

ERROR: Service 'app' failed to build

Open DocBrown101 opened this issue 4 years ago • 5 comments

Hello, since a few weeks I can not build the project successfully.

I use for this: yarn run build Has anything changed in the build process?

This is what the output looks like: 44 problems (40 errors, 4 warnings) 23 errors and 0 warnings potentially fixable with the --fix option.

at emitError (/app/node_modules/webpack/lib/NormalModule.js:173:6)
at printLinterOutput (/app/node_modules/eslint-loader/index.js:134:9)
at /app/node_modules/eslint-loader/index.js:261:11
at /app/node_modules/loader-fs-cache/index.js:139:9
at /app/node_modules/graceful-fs/graceful-fs.js:61:14
at FSReqCallback.oncomplete (fs.js:171:23)

@ ./src/model-worker/index.js 1:0-76 @ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SpotifyMenu.vue?vue&type=script&lang=js& @ ./src/components/SpotifyMenu.vue?vue&type=script&lang=js& @ ./src/components/SpotifyMenu.vue @ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Main.vue?vue&type=script&lang=js& @ ./src/components/Main.vue?vue&type=script&lang=js& @ ./src/components/Main.vue @ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js& @ ./src/App.vue?vue&type=script&lang=js& @ ./src/App.vue @ ./src/main.js @ multi ./src/main.js

ERROR Build failed with errors. error Command failed with exit code 1.

DocBrown101 avatar Jan 27 '21 07:01 DocBrown101

yep, that's because of the web worker plugin that I recently added. For some reason this doesn't play nicely with vue-cli and/or eslint, which seems to be a known issue. It usually helps to start the build a second time (without changing any code!) and then it works... A bit annoying but I couldn't fix it yet.

flxn avatar Jan 27 '21 08:01 flxn

Since I am building it in a Dockerfile, a second attempt is not so easy. Is there another workaround that can work in a Dockerfile?

Can the web worker plugin be removed temporarily, or are the dependencies too large?

DocBrown101 avatar Jan 27 '21 09:01 DocBrown101

I'll take another look and see if I can somehow fix the error but I can't guarantee it right now

flxn avatar Jan 27 '21 09:01 flxn

Thanks for the tip! I have found a nice little workaround.

In the Dockerfile just use these two lines and it will work:

RUN yarn run build; exit 0 RUN yarn run build

DocBrown101 avatar Jan 29 '21 06:01 DocBrown101

In the Dockerfile just use these two lines and it will work:

RUN yarn run build; exit 0 RUN yarn run build

This helped (putting it before the npm installs), but didnt make the Dockerfile run. I tried to debug the Dockerfile a bit and it looks like we need an npm update and then a vue/cli update.

After adding the vue/cli install: npm install -g @vue/cli changing: npm install to: npm install -g [email protected]

and splitting up the npm installs, I got this error:

Step 9/12 : RUN npm run build
 ---> Running in 3a2a6adc1788
> [email protected] build
> vue-cli-service build
sh: 1: vue-cli-service: not found
1 error occurred:
        * Status: The command '/bin/sh -c npm run build' returned a non-zero code: 127, Code: 127

sadly i dont know anything about vue/cli.

ghost avatar Feb 27 '22 12:02 ghost