Quasar: `client-entry.js` not found after upgrade to latest version

Created on 7 Aug 2019  路  20Comments  路  Source: quasarframework/quasar

I just upgraded from v1.0.0-beta.26 to latest using quasar upgrade -i, everything seemed to work fine. Now building my app fails with

This dependency was not found:
 * /usr/src/client/.quasar/client-entry.js in multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./.quasar/client-entry.js`

Full copy/paste of the error:

client_1  |  Dev mode.......... spa
client_1  |  Pkg quasar........ v1.0.5
client_1  |  Pkg @quasar/app... v1.0.4
client_1  |  Debugging......... enabled
client_1  | 
client_1  |  app:extension Running "@quasar/testing-unit-jest" Quasar App Extension... +0ms
client_1  |  app:extension Running "@quasar/testing-e2e-cypress" Quasar App Extension... +7ms
client_1  |  app:extension Running "@quasar/testing" Quasar App Extension... +2ms
client_1  |  app:quasar-conf Reading quasar.conf.js +8ms
client_1  |  app:dev Checking listening address availability (0.0.0.0:8080)... +5ms
client_1  |  app:webpack Extending SPA Webpack config +448ms
client_1  |  app:generator Generating Webpack entry point +6ms
client_1  |  app:dev-server Booting up... +10ms
client_1  | 
client_1  |  app:progress Compiling SPA... +177ms
client_1  |  app:progress Compiled SPA in ~691ms +691ms
client_1  |  ERROR  Failed to compile with 1 errors2:28:05 PM
client_1  | 
client_1  | This dependency was not found:
client_1  | 
client_1  | * /usr/src/client/.quasar/client-entry.js in multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./.quasar/client-entry.js
client_1  | 
client_1  | To install it, you can run: npm install --save /usr/src/client/.quasar/client-entry.js

This error happens without any changes to the code itself, the only change was the quasar upgrade. I've confirmed that /usr/src/client/.quasar/client-entry.js is the correct path and it is there. I've already tried removing node_modules and yarn.lock and reinstalling.

Any help is greatly appreciated

bug

Most helpful comment

in quasar.conf.js I've changed boot files names from 'axios' to 'axios.ts' and it started to work...

All 20 comments

Have you also tried deleting the .quasar folder?

@panstromek no I haven't, I'll give that a shot when I get back to my computer

@panstromek So I tried removing just the .quasar directory, and got the same error. Then I removed all three (node_modules, .quasar and yarn.lock) and I didn't get the error (I guess that's good news). Now I'm getting more errors that look like this:

client_1  |  @ ./node_modules/vue-style-loader??ref--6-oneOf-2-0!./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-2-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-2-2!./node_modules/stylus-loader??ref--6-oneOf-2-3!./node_modules/@quasar/app/lib/webpack/loader.quasar-stylus-variables.js!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/goals/GoalsDashboardRender.vue?vue&type=style&index=0&id=5a77a506&lang=stylus&scoped=true& 4:14-517 14:3-18:5 15:22-525
client_1  |  @ ./src/pages/goals/GoalsDashboardRender.vue?vue&type=style&index=0&id=5a77a506&lang=stylus&scoped=true&
client_1  |  @ ./src/pages/goals/GoalsDashboardRender.vue
client_1  |  @ ./src/router/routes.js
client_1  |  @ ./src/router/index.js
client_1  |  @ ./.quasar/app.js
client_1  |  @ ./.quasar/client-entry.js
client_1  |  @ multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./.quasar/client-entry.js
client_1  | 
client_1  |  error  in ./src/pages/stories/StoriesDashboard.vue?vue&type=style&index=0&lang=stylus&
client_1  | Module build failed (from ./node_modules/stylus-loader/index.js):
client_1  |   Error: /usr/src/client/src/pages/stories/StoriesDashboard.vue:132:9
client_1  |      128| }
client_1  |      129| </script>
client_1  |      130| 
client_1  |      131| <style lang="stylus">
client_1  |      132| @import '~quasar-variables';
client_1  |   ----------------^
client_1  |      133| 
client_1  |      134| .storiesContainer
client_1  |      135|   padding: 0 10%
client_1  |   failed to locate @import file ~quasar-variables.styl

Update: Commenting out all instances of @import '~quasar-variables'; fixed it for now and the app was able to build. I'll still need those quasar-variables though

Yeah, that changed during the beta. You do not need to import those
anymore. Sry for the confusion.

https://quasar.dev/style/stylus-variables#Caveat

@nothingismagick thanks, I'll remove those imports then

This needs to be in a FAQ

Sorry to open this up but I am having the same issue:

We mothballed a Quasar project in early April and came back to it Friday. I ran the upgrade from v1.0.0-beta.3 and when I attempt to build out the project, I get the client-entry.js dependency not found. I had also tried deleting the node_modules, .quasar and yarn.lock files and ran the upgrade again without prevail. We're pretty much stumped - All was building fine until after running the upgrade.

NOTE: We are not using any of the ~quasar-variables so that's not an issue for us.

Also, I noticed that the client-entry.js file is re-writing with every build command - even w/o any changed to any other of the files.

Any help and leads will be greatly appreciated. Thnx!

@CelticParser delete node_modules and yarn.lock/package-lock.json then yarn/npm install again.

That's what I had said I done in my comment above - I had done it twice as well. Anything else?

Please contact me on Discord. Will do a TeamViewer session with you. @CelticParser

try deleting node_modules, .quasar and package-lock.json as well if you have it, then try npm i and build again

TL;DR: I ran into this. Found that it was my own mistake. However, the error could definitely be more accurate to save time.

For fellow developers who might land here from a google search on the error:

I just spent 2 hours debugging this, reading quasar-cli code, comparing the content of the files under .quasar with a different project that I had and is working, and cleaning all the above folders many times. It turned out that I had accidentally uninstalled eslint-loader which is needed in my quasar.conf.js!

So my two cents are:

  • The error can mean: "there was an error in creating a proper .quasar/client-entry.js (while it is [re-]created, even if you rm and then ls!); so go check anything in quasar.confthat might have changed/touched."

  • It's probably not your day-to-day Vue/js/ts code that has caused this. So, for debugging, try to checkout your last working commit, on a clean clone (before npm i), and try npm i && npm run dev. It might take some attempts to binary-search, if it's not very last commit. Once you found out the commit that's causing the problem, go examine that closely to figure out what you have touched at very high level (e.g. package.json or quasar.conf.js) that might be problematic.

in quasar.conf.js I've changed boot files names from 'axios' to 'axios.ts' and it started to work...

@drsaint23 you rock ! Thanks a lot for this hint ! Solved one of my upgrade problems.

Nevertheless, I still have some errors that weren't there before my quasar upgrade -i (from 1.5.8 to 1.12.3) :

These dependencies were not found:

* app/src/router/index in ./.quasar/app.js
* app/src/store/index in ./.quasar/app.js

If someone has an idea about it... (fyi I'm using Vuex and vue router)

@drsaint23 works partially for me.

Now, I have this problem when running quasar dev:

These relative modules were not found:

* ./firebase/index in ./src/store/index.ts
* ./session/index in ./src/store/index.ts
* ./session/state in ./src/store/index.ts
* ./types in ./src/store/index.ts

If I add .ts like required above, others errors are returned

We actually understood what was wrong (at least for our team, and in our case).

Apparently, TS support changed with @quasar/app v1.6+ - here is the doc

So, what worked for us was :

  • In our quasar.conf.js file, add supportTS: true
  • In our tsconfig.json file, add "extends": "@quasar/app/tsconfig-preset"

If you upgrade quasar (using quasar upgrade -i), nothing complains about it, even though it could break your build, for no "apparent" reason.

@rstoenescu display something to the user while upgrading might be a good idea, wouldn't it be ?

_NB : In our tsconfig.json file, we also added "types": ["quasar", "jest"] in our "compilerOptions" object, specifically because we use jest as test engine._

@maucrvlh can u share a reproduction repo pls?

@rstoenescu sorry, because of the project time box, I created a new Quasar project and moved all pages/components/css from older to the newer and the those compilation errors was gone.

Can reproduce this error.

yarn install - with this error (not every install)
npm install - without this error (every install without error)

yarn version - 1.22.4
npm version - 6.14.4

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jippy89 picture jippy89  路  3Comments

adwidianjaya picture adwidianjaya  路  3Comments

danikane picture danikane  路  3Comments

nueko picture nueko  路  3Comments

hctpbl picture hctpbl  路  3Comments