当前位置: 首页 > 知识库问答 >
问题:

VUE-Loader:找不到模块

乐正洲
2023-03-14

我找不到此模块的问题“未找到”错误。

找不到此相对模块:

  • ./graphics/logo.svg在./node_modules/cache-loader/dist/cjs.js中?{“cachedirectory”:“node_modules/.cache/vue-loader”,“cacheidentifier”:“259fb446-vue-loader-template”}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-tify-loader/lib/loader.js!

我的Package.json:

{
  "name": "app",
  "version": "0.1.0",
  "private": false,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.2.1",
    "firebase": "^7.0.0",
    "material-icons": "^0.3.1",
    "register-service-worker": "^1.6.2",
    "vue": "^2.6.10",
    "vue-flickity": "^1.2.1",
    "vue-router": "^3.1.3",
    "vuetify": "^2.0.19",
    "vuex": "^3.1.1"
  },
  "devDependencies": {
    "@mdi/font": "^4.4.95",
    "@vue/cli-plugin-babel": "^3.11.0",
    "@vue/cli-plugin-eslint": "^3.11.0",
    "@vue/cli-plugin-pwa": "^3.11.0",
    "@vue/cli-service": "^3.11.0",
    "@vue/eslint-config-prettier": "^5.0.0",
    "babel-eslint": "^10.0.3",
    "eslint": "^6.5.0",
    "eslint-plugin-prettier": "^3.1.1",
    "eslint-plugin-vue": "^5.2.3",
    "material-design-icons-iconfont": "^5.0.1",
    "node-sass": "^4.12.0",
    "prettier": "1.18.2",
    "sass-loader": "^8.0.0",
    "stylus": "^0.54.7",
    "stylus-loader": "^3.0.2",
    "uglifyjs-webpack-plugin": "^2.2.0",
    "vue-cli-plugin-vuetify": "^0.6.3",
    "vue-loader": "^15.7.1",
    "vue-template-compiler": "^2.6.10",
    "vuetify-loader": "^1.3.0",
    "webpack": "^4.41.0",
    "webpack-cli": "^3.3.9"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "@vue/prettier"
    ],
    "rules": {
      "no-console": "off"
    },
    "parserOptions": {
      "parser": "babel-eslint"
    }
  },
  "postcss": {
    "plugins": {
      "autoprefixer": {}
    }
  },
  "browserslist": [
    "> 1%",
    "last 2 versions"
  ]
}

我使用@vue/cli@3.11.0。我多次尝试删除package-lock.json/node_modules并随后运行npm install。没有什么可以修复它--即使是全局更新Vue CLI和所有包。

共有1个答案

宗政子琪
2023-03-14

将图像放入src/assets文件夹中,并键入如下内容

 类似资料:
  • 我收到这个错误 未能编译/节点\u模块/primeflex/src/\u变量。scss(./node_modules/css loader/dist/cjs.js??ref--8-oneOf-3-1!。/node_modules/postss loader/src??ref--8-oneOf-3-2!。/node_modules/sass loader/dist/cjs??ref--8-oneOf

  • 问题内容: 尝试安装Vue,但出现错误。 一切都按照Vue的说明安装,我不确定为什么会出现此问题。 提前致谢! 问题答案: 尝试使用以下命令更新PATH变量: 更新节点/ NPM可能也有帮助。

  • 左侧的 import App from './App.vue' 有红色波浪号 vscode 提示所 Could not find a declaration file for module './App.vue'. '/home/pon/Desktop/code/me/noface/src/App.vue.js' implicitly has an 'any' type.ts(7016) 为什么?

  • 并不推荐禁用eslint, 编码规范可以一定程序上保证代码质量。但是如果你确实想禁用,可以删除build/webpack.base.conf.js里的相关代码。 preLoaders: [ { test: /.vue$/, loader: 'eslint', include: [ path.join(projectRoot, 'src') ], excl

  • :::tip 版本说明 这份文档是为 Vue Loader v15 及以上版本撰写的。如果你正在从 v14 或更早的版本往这里迁移,请查阅迁移指南。如果你正在使用老版本,其对应的文档在此。 ::: Vue Loader 是什么? Vue Loader 是一个 webpack 的 loader,它允许你以一种名为单文件组件 (SFCs)的格式撰写 Vue 组件: <template> <div

  • 问题内容: 我收到错误,无法在Node.js应用程序中找到模块“ bcrypt” 我尝试使用 npm install bcrypt 安装它, 但仍然出现问题。 错误信息: 问题答案: 使用命令无法为我解决问题。 我尝试了以下命令,但问题解决了。