question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug Report][3.0.0-beta.0] Error: Cannot find module 'vuetify/dist/json/importMap.json'

See original GitHub issue

Environment

Vuetify Version: 3.0.0-beta.0 Vue Version: 3.2.31 Browsers: Chrome 100.0.4896.75 OS: Mac OS 10.15.7

Steps to reproduce

vue-cli@5.0.3 vue create my-beta-app cd my-bata-app vue add vuetify npm run serve

Expected Behavior

run server successfully and open GUI in browser via localhost:8080

Actual Behavior

failed to run serve. logs are in comment section

Reproduction Link

https://jsfiddle.net/

Other comments

<UserName>@<MyDeviceName> my-beta-app % npm run serve

my-beta-app@0.1.0 serve /Users/<UserName>/Development/vue_cli_5/my-beta-app vue-cli-service serve

ERROR Error: Cannot find module ‘vuetify/dist/json/importMap.json’ Require stack: - /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/@vuetify/loader-shared/dist/imports/getImports.js - /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/@vuetify/loader-shared/dist/imports/generateImports.js - /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/@vuetify/loader-shared/dist/index.js - /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/vuetify-loader/dist/scriptLoader.js - /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/vuetify-loader/dist/index.js - /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/vue-cli-plugin-vuetify/index.js - /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/@vue/cli-service/lib/Service.js - /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/@vue/cli-service/bin/vue-cli-service.js Error: Cannot find module ‘vuetify/dist/json/importMap.json’ Require stack:

  • /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/@vuetify/loader-shared/dist/imports/getImports.js
  • /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/@vuetify/loader-shared/dist/imports/generateImports.js
  • /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/@vuetify/loader-shared/dist/index.js
  • /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/vuetify-loader/dist/scriptLoader.js
  • /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/vuetify-loader/dist/index.js
  • /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/vue-cli-plugin-vuetify/index.js
  • /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/@vue/cli-service/lib/Service.js
  • /Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/@vue/cli-service/bin/vue-cli-service.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15) at Function.Module._load (internal/modules/cjs/loader.js:745:27) at Module.require (internal/modules/cjs/loader.js:961:19) at require (internal/modules/cjs/helpers.js:92:18) at Object.<anonymous> (/Users/<UserName>/Development/vue_cli_5/my-beta-app/node_modules/@vuetify/loader-shared/dist/imports/getImports.js:5:19) at Module._compile (internal/modules/cjs/loader.js:1072:14) at Object.Module._extensions…js (internal/modules/cjs/loader.js:1101:10) at Module.load (internal/modules/cjs/loader.js:937:32) at Function.Module._load (internal/modules/cjs/loader.js:778:12) at Module.require (internal/modules/cjs/loader.js:961:19) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! my-beta-app@0.1.0 serve: vue-cli-service serve npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the my-beta-app@0.1.0 serve 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! /Users/<UserName>/.npm/_logs/2022-04-11T19_57_38_410Z-debug.log <UserName>@<MyDeviceName> my-beta-app %

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
jabberwocky1994commented, Apr 22, 2022

I’ve solved it.

Using the exact same steps from OP

cd my-beta-app
vue add vuetify

but I also needed to add npm install vuetify@^3.0.0-alpha.11

For some reason, vuetify isn’t installed after executing vue add vuetify.

1reaction
mstradecommented, Apr 22, 2022

try next steps:

  • nvm use node 17.9.0
  • yarn (or npm install)
  • yarn serve
Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I resolve "Cannot find module" error using Node.js?
Using npm install installs the module into the current directory only (in a subdirectory called node_modules ). Is app.js located under ...
Read more >
cannot find module 'vuex' or its corresponding type declarations
I re-installed every package changed many settings but it still fails to load all paths and show the error above for all files....
Read more >
998358 – can not run npm: Cannot find module 'inherits'
Description of problem: $ npm module.js:340 throw err; ^ Error: Cannot find module 'inherits' at Function.Module.
Read more >
@rollup/plugin-json - npm
Convert .json files to ES6 modules. Latest version: 6.0.0, last published: 8 days ago. Start using @rollup/plugin-json in your project by ...
Read more >
Bug#1000278: npm cannot find module 'isexe' - Google Groups
Bug #1000278: npm cannot find module 'isexe' ... ii node-json-parse-better-errors 1.0.2+~2.3.1-1 ... ii node-json-schema-traverse 1.0.0-3
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found