Quasar: Upgrade to @quasar/app V2 BUT error->.quasar\client-entry.js: Cannot find module 'js-levenshtein'

Created on 14 Aug 2020  Â·  3Comments  Â·  Source: quasarframework/quasar

Describe the bug
I followed the guide to upgrade to @quasar/app V2. But when I tried to start quasar dev, I have been reported an error, copy as below:
` ERROR Failed to compile with 1 errors 3:45:18 ├F10: PM┤
error in ./.quasar/client-entry.js

Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] C:\dev\wtapm\dason_2.quasar\client-entry.js: Cannot find module 'js-levenshtein'
Require stack:

  • C:\dev\wtapm\dason_2\node_modules\@quasar\babel-preset-app\node_modules\@babel\preset-env\lib\utils.js
  • C:\dev\wtapm\dason_2\node_modules\@quasar\babel-preset-app\node_modules\@babel\preset-env\lib\debug.js
  • C:\dev\wtapm\dason_2\node_modules\@quasar\babel-preset-app\node_modules\@babel\preset-env\lib\index.js
  • C:\dev\wtapm\dason_2\node_modules\@quasar\babel-preset-app\index.js
  • C:\dev\wtapm\dason_2\node_modules\@babel\core\lib\config\files\plugins.js
  • C:\dev\wtapm\dason_2\node_modules\@babel\core\lib\config\files\index.js
  • C:\dev\wtapm\dason_2\node_modules\@babel\core\lib\index.js
  • C:\dev\wtapm\dason_2\node_modules\babel-loader\lib\index.js
  • C:\dev\wtapm\dason_2\node_modules\loader-runner\lib\loadLoader.js
  • C:\dev\wtapm\dason_2\node_modules\loader-runner\lib\LoaderRunner.js
  • C:\dev\wtapm\dason_2\node_modules\webpack\lib\NormalModule.js
  • C:\dev\wtapm\dason_2\node_modules\webpack\lib\NormalModuleFactory.js
  • C:\dev\wtapm\dason_2\node_modules\webpack\lib\Compiler.js
  • C:\dev\wtapm\dason_2\node_modules\webpack\lib\webpack.js
  • C:\dev\wtapm\dason_2\node_modules\@quasar\app\lib\dev-server.js
  • C:\dev\wtapm\dason_2\node_modules\@quasar\app\bin\quasar-dev
  • C:\dev\wtapm\dason_2\node_modules\@quasar\app\bin\quasar
  • C:\Users\shiye\AppData\Local\Yarn\Data\global\node_modules\@quasar\cli\bin\quasar (While processing: "C:\dev\wtapm\dason_2\node_modules\@quasar\babel-preset-app\index.js")
  • loader.js:965 Function.Module._resolveFilename
    internal/modules/cjs/loader.js:965:15

  • loader.js:841 Function.Module._load
    internal/modules/cjs/loader.js:841:27

  • loader.js:1025 Module.require
    internal/modules/cjs/loader.js:1025:19

  • helpers.js:72 require
    internal/modules/cjs/helpers.js:72:18

  • utils.js:29 Object.
    [dason_2]/[babel-preset-app]/[@babel]/preset-env/lib/utils.js:29:45

  • loader.js:1137 Module._compile
    internal/modules/cjs/loader.js:1137:30

  • loader.js:1157 Object.Module._extensions..js
    internal/modules/cjs/loader.js:1157:10

  • loader.js:985 Module.load
    internal/modules/cjs/loader.js:985:32

  • loader.js:878 Function.Module._load
    internal/modules/cjs/loader.js:878:14

  • loader.js:1025 Module.require
    internal/modules/cjs/loader.js:1025:19

    @ multi (webpack)-dev-server/client?http://0.0.0.0:8078 (webpack)/hot/dev-server.js ./.quasar/client-entry.js`

To Reproduce
Steps to reproduce the behavior:

  1. quasar dev -m electron

Platform (please complete the following information):
`Operating System - Windows_NT(10.0.19041) - win32/x64
NodeJs - 12.18.3

Global packages
NPM - 6.14.6
yarn - 1.22.4
@quasar/cli - 1.1.0
cordova - Not installed

Important local packages
quasar - 1.12.13 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
@quasar/app - 2.0.6 -- Quasar Framework local CLI
@quasar/extras - 1.9.4 -- Quasar Framework fonts, icons and animations
eslint-plugin-quasar - Not installed
vue - 2.6.11 -- Reactive, component-oriented view layer for modern web interfaces.
vue-router - 3.2.0 -- Official router for Vue.js 2
vuex - 3.4.0 -- state management for Vue.js
electron - 4.2.4 -- Build cross platform desktop apps with JavaScript, HTML, and CSS
electron-packager - 13.1.1 -- Customize and package your Electron app with OS-specific bundles (.app, .exe, etc.) via JS or CLI
electron-builder - Not installed
@capacitor/core - Not installed
@capacitor/cli - Not installed
@capacitor/android - Not installed
@capacitor/ios - Not installed
@babel/core - 7.11.1 -- Babel compiler core.
webpack - 4.43.0 -- Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff. webpack-dev-server - 3.11.0 -- Serves a webpack app. Updates the browser on changes.
workbox-webpack-plugin - 4.0.0 -- A plugin for your Webpack build process, helping you generate a manifest of local files that workbox-sw should precache.
register-service-worker - 1.7.1 -- Script for registering service worker, with hooks
typescript - 3.9.5 -- TypeScript is a language for application scale JavaScript development

Quasar App Extensions
None installed

Additional context
Add any other context about the problem here.

bug

All 3 comments

Please either use yarn for package management or run npm install until it gets it right. There are a lot of problems with npm on windows, but there is nothing one can do except retry.

Please either use yarn for package management or run npm install until it gets it right. There are a lot of problems with npm on windows, but there is nothing one can do except retry.

Thanks for your reply. Yarn is the very package management tool I am using. And I tried yarn install, all is updated.
However when I tried npm install, it really works. Problem solved. Thanks!

Wow, it's the first time this happens. Ok, so yarn is broken also on windows :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lukadriel7 picture lukadriel7  Â·  3Comments

mesqueeb picture mesqueeb  Â·  3Comments

green-mike picture green-mike  Â·  3Comments

slowaways picture slowaways  Â·  3Comments

xereda picture xereda  Â·  3Comments