You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Not sure this is a but or rather some problem with my setup.
During the building of a docker image from my projet I get a Cannot read property 'quasar' of undefined error which I don't get while compiling the same problem on my dev PC. I've tried many things but can't figure out why there is different behavior during docker build. The package-lock.json files are identical.
Full error message
> vue-cli-service build
ERROR TypeError: Cannot read property 'quasar' of undefined
TypeError: Cannot read property 'quasar' of undefined
at module.exports (/tmp/build/apps/frontend/node_modules/vue-cli-plugin-quasar/index.js:13:29)
at /tmp/build/apps/frontend/node_modules/@vue/cli-service/lib/Service.js:78:7
at Array.forEach (<anonymous>)
at Service.init (/tmp/build/apps/frontend/node_modules/@vue/cli-service/lib/Service.js:76:18)
at Service.run (/tmp/build/apps/frontend/node_modules/@vue/cli-service/lib/Service.js:215:10)
at Object.<anonymous> (/tmp/build/apps/frontend/node_modules/@vue/cli-service/bin/vue-cli-service.js:36:9)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue3-decorators-poc@0.1.1 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue3-decorators-poc@0.1.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-01-07T13_20_17_622Z-debug.log
The command '/bin/sh -c npm run build' returned a non-zero code: 1
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Dockerfile
click to view file
ARG BUILD_DIR="/tmp/build"ARG AP="/usr/bruyland"#FROM node:16.13.1-alpine as baseFROM node:14 as baseFROM base AS builderARG BUILD_DIR WORKDIR ${BUILD_DIR}COPY ./apps/backend/*.json ./apps/backend/COPY ./apps/backend/src/ ./apps/backend/src/COPY ./apps/frontend/*.json ./apps/frontend/COPY ./apps/frontend/src/ ./apps/frontend/src/COPY ./apps/frontend/src/models/ ./apps/backend/src/models/WORKDIR ${BUILD_DIR}/apps/backendRUN npm set progress=falseRUN npm installRUN npm run buildWORKDIR ${BUILD_DIR}/apps/frontendRUN npm installRUN npm run buildFROM base as releaseRUN ln -sf /usr/share/zoneinfo/Europe/Brussels /etc/localtimeARG BUILD_DIRARG COMMITARG TAGARG APRUN echo COMMIT=$COMMITRUN echo TAG=$TAGRUN echo AP=$APRUN echo BUILD_DIR=$BUILD_DIR/apps/backendWORKDIR ${AP}RUN echo COPYING BUILT APP FROM BUILDER CONTAINERCOPY --from=builder ${BUILD_DIR}/package.json ${AP}COPY --from=builder ${BUILD_DIR}/package-lock.json ${AP}COPY --from=builder ${BUILD_DIR}/dist/ ${AP}RUN npm install --only=production --no-optionalENV PORT=3000ENV NODE_ENV=productionENV COMMIT=$COMMITENV TAG=$TAGEXPOSE ${PORT}RUN mkdir -p logs && chown 1000 logs && chgrp 1000 logs && chmod -R o+w logsVOLUME ["${AP}/logs", "${AP}/config"]USER nodeCMD [ "node", "dist/main" ]
Describe the bug
Not sure this is a but or rather some problem with my setup.
During the building of a docker image from my projet I get a
Cannot read property 'quasar' of undefinederror which I don't get while compiling the same problem on my dev PC. I've tried many things but can't figure out why there is different behavior during docker build. Thepackage-lock.jsonfiles are identical.Full error message
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Dockerfile
click to view file
Additional context
package.json file
click to view file
{ "name": "uitpak2-frontend", "version": "0.1.1", "private": true, "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint" }, "dependencies": { "@quasar/extras": "^1.0.0", "axios": "^0.24.0", "axios-date-reviver": "^1.0.0-beta.2", "class-transformer": "^0.4.0", "core-js": "^3.6.5", "date-fns": "^2.25.0", "json-loader": "^0.5.7", "jsprintmanager": "^4.0.3", "lodash": "^4.17.21", "marked": "^4.0.3", "quasar": "^1.16.0", "reflect-metadata": "^0.1.13", "vue": "^2.6.11", "vue-class-component": "^7.2.3", "vue-cli-plugin-quasar": "^3.0.2", "vue-property-decorator": "^9.1.2", "vue-router": "^3.2.0", "vuex": "^3.4.0" }, "devDependencies": { "@types/jsprintmanager": "^2.0.0", "@types/lodash": "^4.14.177", "@types/marked": "^4.0.0", "@typescript-eslint/eslint-plugin": "^4.18.0", "@typescript-eslint/parser": "^4.18.0", "@vue/cli-plugin-babel": "~4.5.0", "@vue/cli-plugin-eslint": "~4.5.0", "@vue/cli-plugin-router": "~4.5.0", "@vue/cli-plugin-typescript": "~4.5.0", "@vue/cli-plugin-vuex": "~4.5.0", "@vue/cli-service": "~4.5.0", "@vue/eslint-config-prettier": "^6.0.0", "@vue/eslint-config-typescript": "^7.0.0", "eslint": "^6.7.2", "eslint-plugin-prettier": "^3.3.1", "eslint-plugin-vue": "^6.2.2", "node-sass": "^4.13.0", "prettier": "^2.2.1", "sass-loader": "^8.0.0", "typescript": "~4.1.5", "vue-template-compiler": "^2.6.11", "vuex-class": "^0.3.2", "vuex-module-decorators": "^1.0.1" } }vue.config.js
click to view file
File that causes the error in the container
click to view file