quasarframework / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time
https://quasar.dev
MIT License
25.97k stars 3.52k forks source link

Cannot find module '/app/node_modules/quasar/dist/transforms/import-transformation.js' #17211

Closed SapiKuat closed 6 months ago

SapiKuat commented 6 months ago

What happened?

On 1th may, my build using quasar 2.14.0 was fine, but since 3 days ago, everytime i run npm build an error is encountered Cannot find module '/app/node_modules/quasar/dist/transforms/import-transformation.js'

i did a fresh npm install on docker without using npm build, and checked the node modules. indeed the import-transformation is missing, i tried upgrading it to 2.16.4 and 2.15.4 but nothing is working, im attaching my package.json

i have tried deleting the package-lock and doing reinstall , build a new image on docker , but nothing has worked.

root@db12829f79ed:/app/node_modules/quasar/dist/transforms# ls api-list.json auto-import.json import-map.json loader-asset-urls.json { "name": "testcase", "version": "1.2.0", "private": true, "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint", "start": "node server.js" }, "dependencies": { "@mdi/font": "^7.2.96", "@quasar/extras": "^1.0.0", "apexcharts": "^3.44.0", "axios": "^0.27.2", "core-js": "^3.8.3", "encrypt-storage": "^2.12.16", "express": "^4.18.2", "fernet": "^0.4.0", "html2canvas": "^1.4.1", "jspdf": "^2.5.1", "moment": "^2.29.4", "node-polyfill-webpack-plugin": "^2.0.1", "pdf-viewer-vue": "^0.2.7", "pinia": "^2.1.4", "quasar": "^2.14.0", "register-service-worker": "^1.7.2", "roboto-fontface": "*", "sanitize-html": "^2.11.0", "stream": "^0.0.2", "sweetalert2": "^11.7.12", "vue": "^3.2.13", "vue-draggable-next": "^2.2.1", "vue-router": "^4.0.3", "vue3-apexcharts": "^1.4.4", "webfontloader": "^1.0.0" }, "devDependencies": { "@babel/core": "^7.12.16", "@babel/eslint-parser": "^7.12.16", "@vue/cli-plugin-babel": "~5.0.0", "@vue/cli-plugin-eslint": "~5.0.0", "@vue/cli-plugin-pwa": "~5.0.0", "@vue/cli-plugin-router": "~5.0.0", "@vue/cli-plugin-vuex": "~5.0.0", "@vue/cli-service": "~5.0.0", "eslint": "^7.32.0", "eslint-plugin-vue": "^8.0.3", "sass": "^1.69.5", "sass-loader": "^12.0.0", "vue-cli-plugin-quasar": "~5.0.2", "vue-cli-plugin-vuetify": "~2.5.8", "vue-loader": "^17.2.2", "webpack-plugin-vuetify": "^2.0.0-alpha.0" } }

What did you expect to happen?

npm build should be successful as nothing has been changed on my package json

Reproduction URL

https://codesandbox.io/p/devbox/adoring-euler-l2l9t9?workspaceId=ca3250ee-db75-4a69-9cba-e586c0e00c73&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clweek8ty000738642nhk4sua%2522%252C%2522sizes%2522%253A%255B70%252C30%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clweek8ty00023864xh0n0zps%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clweek8ty000438640hu5vjet%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clweek8ty00063864v7txewmk%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clweek8ty00023864xh0n0zps%2522%253A%257B%2522id%2522%253A%2522clweek8ty00023864xh0n0zps%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clweekw6i004t3864dienpjh3%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A1%252C%2522startColumn%2522%253A1%252C%2522endLineNumber%2522%253A41%252C%2522endColumn%2522%253A1%257D%255D%252C%2522filepath%2522%253A%2522%252Fpackage.json%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clweekw6i004t3864dienpjh3%2522%257D%252C%2522clweek8ty00063864v7txewmk%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clweek8ty00053864m7tbn6od%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_PORT%2522%252C%2522taskId%2522%253A%2522start%2522%252C%2522port%2522%253A8080%252C%2522path%2522%253A%2522%2522%257D%255D%252C%2522id%2522%253A%2522clweek8ty00063864v7txewmk%2522%252C%2522activeTabId%2522%253A%2522clweek8ty00053864m7tbn6od%2522%257D%252C%2522clweek8ty000438640hu5vjet%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clweek8ty00033864rqrjpry9%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522start%2522%257D%255D%252C%2522id%2522%253A%2522clweek8ty000438640hu5vjet%2522%252C%2522activeTabId%2522%253A%2522clweek8ty00033864rqrjpry9%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D

How to reproduce?

  1. copy the dependency i have provided
  2. run npm install
  3. run npm build

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)

Platforms/Browsers

Other

Quasar info output

No response

Relevant log output

Syntax Error: Thread Loader (Worker 0)
Cannot find module '/app/node_modules/quasar/dist/transforms/import-transformation.js'

 ERROR  Error: Build failed with errors.
Error: Build failed with errors.
    at /app/node_modules/@vue/cli-service/lib/commands/build/index.js:207:23
    at /app/node_modules/webpack/lib/webpack.js:159:8
    at /app/node_modules/webpack/lib/HookWebpackError.js:68:3
    at Hook.eval [as callAsync] (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/app/node_modules/tapable/lib/Hook.js:18:14)
    at Cache.shutdown (/app/node_modules/webpack/lib/Cache.js:156:23)
    at /app/node_modules/webpack/lib/Compiler.js:1358:15
    at Hook.eval [as callAsync] (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/app/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.close (/app/node_modules/webpack/lib/Compiler.js:1351:23)
    at /app/node_modules/webpack/lib/webpack.js:158:16
    at finalCallback (/app/node_modules/webpack/lib/Compiler.js:476:32)
    at /app/node_modules/webpack/lib/Compiler.js:500:13
    at Hook.eval [as callAsync] (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:24:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/app/node_modules/tapable/lib/Hook.js:18:14)
    at onCompiled (/app/node_modules/webpack/lib/Compiler.js:498:21)
    at /app/node_modules/webpack/lib/Compiler.js:1329:17
    at Hook.eval [as callAsync] (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/app/node_modules/tapable/lib/Hook.js:18:14)
    at /app/node_modules/webpack/lib/Compiler.js:1325:33
    at finalCallback (/app/node_modules/webpack/lib/Compilation.js:2900:11)
    at /app/node_modules/webpack/lib/Compilation.js:3209:11
    at Hook.eval [as callAsync] (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/app/node_modules/tapable/lib/Hook.js:18:14)
    at /app/node_modules/webpack/lib/Compilation.js:3202:38
    at eval (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:17:1)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
The command '/bin/sh -c npm run build' returned a non-zero code: 1

Additional context

No response

SapiKuat commented 6 months ago

solved, by upgrading "vue-cli-plugin-quasar": "~5.0.2" to > 5.1.0

NetMango commented 5 months ago

Same issue at me! I was using quasar v2.15.2 for a while. Last friday i decided it's time to upgrade. After ugrade I received the same error message. I was unable to find solution, i wanted to open a ticket for this issue, but i had to go.... And now I found you.

I was wondering when i read, why should i upgrade vue-cli-plugin-quasar, when i never had to install it?

I found this info at v.2.16.0:

Will require these minimum CLI/plugin versions (if using any of the following):

q/app-vite v1.9+ / v2.0.0-beta.12+
q/app-webpack v3.13+ / v4.0.0-beta.13+
q/vite-plugin v1.7+
vite-cli-plugin-quasar v5.1+

But originally I created my app with Quasar CLI (with Vite) as https://quasar.dev/start/pick-quasar-flavour has recommended. My vite-plugin is on right version. So what is wrong? I've never found problem like this since v2.7.1. Finally I tried an alternative version:

yarn add @quasar/app-vite

and the result is same like at @SapiKuat , Quasar works again. Thank you

kheengz commented 5 months ago

solved, by upgrading "vue-cli-plugin-quasar": "~5.0.2" to > 5.1.0 @SapiKuat worked for me.