@dobbel It’s not a solution, but thanks for the answer.
I found the issue, it was the wrong import path of the component in routes. Component name Index.vue was imported without extension .vue and it created an error.
But strange that quasar dev works without any errors
A
Best posts made by Anatolii
-
RE: How to build a quasar app with docker?
Latest posts made by Anatolii
-
RE: How to build a quasar app with docker?
@dobbel It’s not a solution, but thanks for the answer.
I found the issue, it was the wrong import path of the component in routes. Component name Index.vue was imported without extension .vue and it created an error.
But strange that quasar dev works without any errors -
How to build a quasar app with docker?
System: Windows 10 (19042.804)
Quasar version: 1.15.3
Docker version: 3.1.0 (51484)Dockerfile
FROM node:13.14-alpine as develop-stage WORKDIR /app COPY package*.json ./ RUN yarn global add @quasar/cli \ && npm i -g eslint COPY . . # build stage FROM develop-stage as build-stage RUN yarn \ && yarn lint \ && quasar build # production stage FROM nginx:1.17.5-alpine as production-stage COPY --from=build-stage /app/dist/spa /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]
Build throws next error:
#13 111.2 Module not found: Error: Can't resolve 'src/pages' in '/app/src/router' #13 111.2 resolve 'src/pages' in '/app/src/router' #13 111.2 Parsed request is a module #13 111.2 using description file: /app/package.json (relative path: ./src/router) #13 111.2 aliased with mapping 'src': '/app/src' to '/app/src/pages' #13 111.2 using description file: /app/package.json (relative path: ./src/router) #13 111.2 Field 'browser' doesn't contain a valid alias configuration #13 111.2 using description file: /app/package.json (relative path: ./src/pages) #13 111.2 no extension #13 111.2 Field 'browser' doesn't contain a valid alias configuration #13 111.2 /app/src/pages is not a file #13 111.2 .mjs #13 111.2 Field 'browser' doesn't contain a valid alias configuration #13 111.2 /app/src/pages.mjs doesn't exist #13 111.2 .js #13 111.2 Field 'browser' doesn't contain a valid alias configuration #13 111.2 /app/src/pages.js doesn't exist #13 111.2 .vue #13 111.2 Field 'browser' doesn't contain a valid alias configuration #13 111.2 /app/src/pages.vue doesn't exist #13 111.2 .json #13 111.2 Field 'browser' doesn't contain a valid alias configuration #13 111.2 /app/src/pages.json doesn't exist #13 111.2 .wasm #13 111.2 Field 'browser' doesn't contain a valid alias configuration #13 111.2 /app/src/pages.wasm doesn't exist #13 111.2 as directory #13 111.2 existing directory #13 111.2 using path: /app/src/pages/index #13 111.2 using description file: /app/package.json (relative path: ./src/pages/index) #13 111.2 no extension #13 111.2 Field 'browser' doesn't contain a valid alias configuration #13 111.2 /app/src/pages/index doesn't exist #13 111.2 .mjs #13 111.2 Field 'browser' doesn't contain a valid alias configuration #13 111.2 /app/src/pages/index.mjs doesn't exist #13 111.2 .js #13 111.2 Field 'browser' doesn't contain a valid alias configuration #13 111.2 /app/src/pages/index.js doesn't exist #13 111.2 .vue #13 111.2 Field 'browser' doesn't contain a valid alias configuration #13 111.2 /app/src/pages/index.vue doesn't exist #13 111.2 .json #13 111.2 Field 'browser' doesn't contain a valid alias configuration #13 111.2 /app/src/pages/index.json doesn't exist #13 111.2 .wasm #13 111.2 Field 'browser' doesn't contain a valid alias configuration #13 111.2 /app/src/pages/index.wasm doesn't exist
I found this topic and maybe it’s the same issue, but there is no answer.
Quasar build fails