#javascript #node.js #vue.js #nuxt.js
#javascript #node.js #vue.js #nuxt.js
Вопрос:
nuxtJS при компиляции выдает ошибку, Google не помог, написано, что при объявлении заглавных букв возникает, однако я получаю ошибку непосредственно в node_modules, а не в моих компонентах
[HMR] bundle 'client'
has 6 warnings
vendors.app.js: 47737. / node_modules / base64 - js / index.jsThere are multiple modules with names that only differ in casing.This can lead to unexpected behavior when compiling on a filesystem with other
case -semantic.Use equal casing.Compare these module identifiers: * C: dashboard node_modules base64 - js index.js Used by 1 module(s), i.e.C: dashboard node_modules buffer index.js * C: dashboard node_modules base64 - js index.js Used by 1 module(s), i.e.C: dashboard node_modules buffer index.js. / node_modules / buffer / index.jsThere are multiple modules with names that only differ in casing.This can lead to unexpected behavior when compiling on a filesystem with other
case -semantic.Use equal casing.Compare these module identifiers: * C: dashboard node_modules buffer index.js Used by 3 module(s), i.e.C: dashboard node_modules jszip lib support.js * C: dashboard node_modules buffer index.js Used by 2 module(s), i.e.C: dashboard node_modules core - util - is lib util.js. / node_modules / ieee754 / index.jsThere are multiple modules with names that only differ in casing.This can lead to unexpected behavior when compiling on a filesystem with other
case -semantic.Use equal casing.Compare these module identifiers: * C: dashboard node_modules ieee754 index.js Used by 1 module(s), i.e.C: dashboard node_modules buffer index.js * C: dashboard node_modules ieee754 index.js Used by 1 module(s), i.e.C: dashboard node_modules buffer index.js. / node_modules / isarray / index.jsThere are multiple modules with names that only differ in casing.This can lead to unexpected behavior when compiling on a filesystem with other
case -semantic.Use equal casing.Compare these module identifiers: * C: dashboard node_modules isarray index.js Used by 1 module(s), i.e.C: dashboard node_modules buffer index.js * C: dashboard node_modules isarray index.js Used by 2 module(s), i.e.C: dashboard node_modules readable - stream lib _stream_readable.js. / node_modules / process / browser.jsThere are multiple modules with names that only differ in casing.This can lead to unexpected behavior when compiling on a filesystem with other
case -semantic.Use equal casing.Compare these module identifiers: * C: dashboard node_modules process browser.js Used by 2 module(s), i.e.C: dashboard node_modules setimmediate setImmediate.js * C: dashboard node_modules process browser.js Used by 2 module(s), i.e.C: dashboard node_modules readable - stream lib _stream_readable.js. / node_modules / webpack / buildin / global.jsThere are multiple modules with names that only differ in casing.This can lead to unexpected behavior when compiling on a filesystem with other
case -semantic.Use equal casing.Compare these module identifiers: * C: dashboard node_modules webpack buildin global.js Used by 8 module(s), i.e.C: dashboard node_modules babel - loader lib index.js ? ? ref--2 - 0!C : dashboard.nuxt client.js * C : dashboard node_modules webpack buildin global.js Used by 4 module(s), i.e.C: dashboard node_modules readable - stream lib _stream_writable.js
у кого-нибудь есть идеи?
мой nuxt.config.js
const pkg = require("./package");
const VuetifyLoaderPlugin = require("vuetify-loader/lib/plugin");
module.exports = {
mode: "spa",
head: {
title: "Vue Template",
},
css: [
"~/assets/style/theme.styl",
"~/assets/style/app.styl",
"font-awesome/css/font-awesome.css",
"roboto-fontface/css/roboto/roboto-fontface.css"
],
plugins: [
"~/plugins/vuetify",
"~/plugins/vee-validate",
"~/plugins/dxdatagrid",
"~/plugins/vue-notifications"
],
modules: [],
build: {
vendor: ["axios", "vuetify", "vue-notifications", "mini-toastr"],
transpile: ["vuetify/lib"],
plugins: [new VuetifyLoaderPlugin()],
extend(config, ctx) {}
}
};
Комментарии:
1. вы пытались удалить файл блокировки и модули узла и переустановить?
2. конечно , я пытался
Ответ №1:
Ошибка возникает, если вы импортируете один и тот же файл с разницей в капитализации в разных местах. например; — ниже я импортирую тот же компонент ‘AppControlInput’ с разницей в капитализации ‘ui’. В первом случае ‘ui’ в нижнем регистре, а в другом ‘ui’ в верхнем регистре.
- импортируйте AppControlInput из «~/components/ui/AppControlInput»;
- импортируйте AppControlInput из «~/components/UI/AppControlInput»;
Просто убедитесь, что у вас одинаковая заглавная буква в каждом месте, где вы импортируете компонент.