268 questions
0
votes
1
answer
298
views
Syntax Error: TypeError: Cannot read properties of undefined (reading 'styles') When migrating to Vue3
I am currently trying to migrate from Vue2 to Vue3 using migration build.
When I try to build the project, the following error occurs:
Syntax Error: TypeError: Cannot read properties of undefined (...
0
votes
1
answer
243
views
How to use Paged.js in Vue.js2?
let paged = new Previewer();
paged.preview('test', \[\], document.body).then((flow) =\> {
console.log("Rendered", flow.total, "pages.");
});
Facing issue:
1:1188-1197 export '...
0
votes
0
answers
110
views
i have file csv and separated with semicolon always got errormodule parse failed: unexpected token (2:12)
always show error
ERROR in ./public/data-test.csv 2:12
Module parse failed: Unexpected token (2:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to ...
-1
votes
1
answer
507
views
Issue with rendering a component in Laravel Nova after updating dependencies
Hello Stack Overflow community!
I'm facing an issue with rendering a component in Laravel Nova after updating dependencies in the project. When trying to open the component in Laravel Nova, I get an ...
2
votes
1
answer
3k
views
[Vue warn]: Failed to resolve component: swiper-slide and swiper-container when using Swiper Element
I'm using Swiper Element for slide effects in a Vue app, it works fine but I keep getting these two warnings,
[Vue warn]: Failed to resolve component: swiper-slide
If this is a native custom element, ...
0
votes
1
answer
783
views
Vue template compile error, "Cannot read properties of undefined (reading '_c')"
I'm working on adding a custom tool to an existing Laravel application using Laravel Nova for the admin panel. The auto generated tool that is created with "php artisan nova:tool vendor/name"...
0
votes
1
answer
139
views
Error when importing json in Vue script block - "module has no exports"
I have a new, very barebones project. If I attempt to import json into my entry file (vanilla .js), it works, eg:
import pkg from './package.json';
When I attempt to do the same in a .vue file's <...
0
votes
0
answers
121
views
How to set up webpack only once, to compile multiple vue apps into separate js bundles
I'm trying to configure webpack to compile/bundle small standalone Vue apps (each living in their own separate subdirectory) once, automatically from the top level; instead of setting up webpack ...
0
votes
2
answers
794
views
Update Nodejs 14->18 — webpack have the same syntaxError: /.../xxx.vue: Unexpected token, expected "," (1:8) for ALL Vue 2 components in the project
I updated Nodejs version on my Vue 2 project from 14 to 18 (16 has the same issue). It was fine in the beginning. But, at some point in the last month when I decided to clean up Docker caches, images, ...
1
vote
1
answer
281
views
Lifecycle hooks not working properly in order After migration from vu2 to vue3
The issue is when I switch from Route 1 to Route 2 then First "created" of route2 being called after that "unmounted" of route1. Actually it should be like first "unmounted&...
0
votes
0
answers
48
views
require method images not rendered vue js
**The require method images are not rendered with Vuejs. Even though I've add the vue-loader dependency, and the props are delivered correctly. The template is simple - just an array in App component, ...
2
votes
2
answers
17k
views
Vue3 build error: At least one <template> or <script> is required in a single file component
I try to migrate a large existing codebase from Vue2 to Vue3 using Webpack. So I upgraded the necessary packages in package.json to looks like this (no problems here):
"vue": "^3.2.45&...
1
vote
1
answer
949
views
Adding *.vue files support to the Shopware 6 Storefront (Module not found: Error: Can't resolve 'vue-loader')
I want to create mini Vue app embedded in the Shopware 6 storefront (inside TWIG ecosystem). So far I have this:
MyPluginTheme\src\Resources\app\storefront\build\webpack.config.js
const { join, ...
1
vote
0
answers
231
views
V-model is not working in Vue 3 when using SFC with vue loader
v-model works fine when using string templates using template: '<div>....' but doesn't work when using SFC components using <template> element. I am using a custom configuration with ...
12
votes
2
answers
15k
views
Vue loader 17.0.0 + Webpack 5.74.0 - Module build failed
I am trying to use vue-loader with my SPA VUE APP, And I'm getting the following error.
ERROR in ./app2.vue
Module build failed (from ./node_modules/vue-loader/dist/index.js):
TypeError: Cannot ...
4
votes
0
answers
850
views
SassError: expected "{"
This is the style from my Vue template file:
<style lang="sass" scoped>
a
color: inherit
cursor: pointer
.nav-link.active
border-bottom: 4px solid #28a745
.nav-...
-1
votes
1
answer
2k
views
Enable Typescript in SFC: Laravel 9 + vite + vue-loader
I wanted to create a project using this github repo as a base:
https://github.com/suresh-ramani/laravel-vue3-vite
The repo essentially enables a Laravel 9 full stack server-side rendered application ...
2
votes
1
answer
2k
views
Very high memory consumption while building multiple vue apps with vue-loader
We are using vue-loader (usually together with the html-webpack-plugin, but I omit this in the following because it is not the important part) to transpile multiple vue based applications within a ...
0
votes
0
answers
230
views
Problems with configuring my project to be able to use VueJs single page components
I have my VueJS project and I want to use VueJs single page components in it.
The project is desired to be CRUD application that works with PotrgeSQL tables so it has all corresponding dependencies.
...
0
votes
0
answers
1k
views
Webpack 5 doesn't see styles in vue 2 sfc
I'm starting a legacy assembly of webpack 3 on webpack 5. When setting up the config and updating plugins, I ran into a problem, the sfc components of vue see only the styles of scss modules.
<!-- ...
0
votes
1
answer
533
views
Vue2 Template compiler broken?
I compile my code via webpack(^5.51.1) and vue-loader(^17.0.0) and I tried firing up an old project and it's giving me this error:
[webpack-cli] Failed to load '/var/www/webpack.config.js' config
[...
0
votes
2
answers
4k
views
vue 3 build + webpack causes JavaScript heap out of memory
In my local build environment, there are some directories at the base directory where my webpack config is. These directories contain quite a few files (they are other applications that are part of ...
2
votes
0
answers
1k
views
Cannot find module 'vue-loader/lib/loaders/pitcher' into webpack electron app
My webpack dev server which need to launch electron app generate this error :
Cannot find module 'vue-loader/lib/loaders/pitcher'
I installed the next version of vue-loader because I'm in vueJS3 ...
0
votes
1
answer
1k
views
How do I get my images to load in Vue app using webpack and vue-loader?
I'm new to Vue and working off some legacy code on a Vue app and am not sure why my images aren't loading to the page.
I know my component's paths to the assets are correct because I have an extension ...
7
votes
0
answers
960
views
Vue3, Vite and Pre compiled templates to avoid 'unsafe-eval'
Is there a way to pre compile Vue3 templates for client side rendering using Vite to avoid 'unsafe-eval' errors? Seems like Vue-Loader allowed template pre compilation but I am not finding the same ...
2
votes
2
answers
2k
views
Why css is not applied for a component of one app into another app in vue
Hi i have situation where css and scss is not applied of a component of 1 app into another app
I have 2 apps
core
plugins
i want to use the components of a core app into plugins app
here is how i'm ...
0
votes
1
answer
289
views
Vue loader after updating breaks slots
I'm not sure what's going on here, I updated webpack-encore and vue loader to the most recent versions, and suddenly the HTML for slots compiles into something really weird.
It's just a simple
<...
3
votes
0
answers
355
views
How to import raw CSS as raw text in JS side, generated from Vue components?
I'd like to be able to import the whole css file that was generated from Vue components to css/app.[hash].css as raw text from js code.
I.e. I would like to do something like
const cssAsRawText = ...
4
votes
2
answers
17k
views
How to solve Module parse failed: Unexpected token (3:27) in Vue 3 project
After trying to clone my project from GitHub, (Had to delete I locally). I started to get the following error.
error in ./src/App.vue?vue&type=template&id=7ba5bd90&ts=true
Module parse ...
0
votes
0
answers
258
views
Webpack/Vue loader looks for node module in current directory instead of node_modules
I've checked multiple related questions but none seems to fit.
I'm using multiple libraries in my web app, importing them inside Vue single file components without too much hassle as follows:
<...
2
votes
2
answers
5k
views
Vue - Module build failed (from ./node_modules/vue-loader/lib/loaders/templateLoader.js): SyntaxError: Unexpected token (13:1080)
When i try to run "cross-env NODE_ENV=development nodemon ./server.js" i got these error:
ModuleBuildError: Module build failed (from
./node_modules/vue-loader/lib/loaders/templateLoader.js)...
3
votes
0
answers
414
views
How can I configure Webpack and Vue-Loader to treat warnings as errors?
QUESTION: How can I configure Webpack to treat warnings as errors when using Vue-Loader?
BACKGROUND: My Webpack configuration is using Vue-Loader to build an app that uses Vue single-file components. ...
1
vote
1
answer
1k
views
TypeError: Cannot read property 'options' of undefined
After working through a major npm package update, I am getting an error thrown from my nuxt config file…
I haven’t found a link showing me transformAssetUrls current state (if it has been deprecated/...
3
votes
0
answers
732
views
Why am I getting "Cannot find module..." Typescript error for ".vue" file on webpack-dev-server recompilation?
I've setup a small webpack project which creates a Vue app bundle which is included in a static HTML file where the app is injected. I want to have components written in Typescript so I've included ts-...
4
votes
3
answers
6k
views
VuetifyLoaderPlugin Error No matching rule for vue-loader found
Im trying to install the vuetify but it is giving me this Error:
[VuetifyLoaderPlugin Error] No matching rule for vue-loader found.
Make sure there is at least one root-level rule that uses vue-loader ...
8
votes
4
answers
5k
views
Removing all data-test attributes from Vue templates during production build in Vue 3
I work with Vue3 in TS (last vue-cli).
I want to get all nodes (vnodes) elements when vue-loader compile .vue file.
I need to read nodes attributes and remove all "data-test".
I have try in ...
2
votes
1
answer
1k
views
npm ERR! How to install compiler-sfc that meets peer dependency with [email protected]?
My packageJSON
"devDependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.35",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
...
0
votes
1
answer
229
views
Compiling error using Vue loader and AWS Amplify
When running vue-cli-service build I get this error. I don't know what's is missing.
NODE_ENV=development vue-cli-service build --mode development --watch
This relative module was not found:
* ./...
4
votes
1
answer
2k
views
Using Vue SFC into existing Web pages with CDN vue
I would like to ask what is the best approach to include and reuse Vue components that are written in .vue files (SFC), into existing web pages.
For example lets say there is already an SPA project ...
6
votes
1
answer
3k
views
Avoid v-deep duplication with SCSS and Vue 3
Vue 3 deprecated using v-deep as a combinator: https://github.com/vuejs/rfcs/blob/master/active-rfcs/0023-scoped-styles-changes.md
We have existing code using SCSS and v-deep like this:
.class ::v-...
2
votes
1
answer
639
views
Prepending custom loader to vue-loader breaks when template includes custom tags
I have a vue2 component that looks like this:
<template>
<p>Hello world</p>
</template>
<script>
export default { name: 'Example' };
</script>
<docs>
Some ...
2
votes
1
answer
2k
views
Vue compiler can't resolve 'vue'
Version
3.0.5
Reproduction link
https://github.com/clark-cui/vue3-problem
Steps to reproduce
yarn
npm run dev
What is expected?
devServer work successfully.
What is actually happening?
Module not ...
1
vote
1
answer
702
views
Scoped css not copied in vue component
I have a scoped style tag in my vue component:
<style scoped>
.ttt{
background-color: red;
}
</style>
When I build my project with npm and webpack, the styles are not ...
4
votes
4
answers
12k
views
Laravel, Vue - "You may need an appropriate loader" for template tags
I am currently building a web application using Laravel and Vue. The error that I am getting is for all the components that I have.
ERROR in ./resources/assets/js/components/App 1:0
Module parse ...
1
vote
1
answer
1k
views
HMR / Hot Module Replacement problem with Vue.js 3 & webpack 5
I have a problem with webpack 5 and Vue.js 3 hot reloading - I don't know if some npm packages need updating (vue-loader?) or if I'm doing something wrong.
I created a minimal repository here:
https://...
44
votes
5
answers
75k
views
Vuejs 3 webpack : Problem with vue-template-compiler
I am trying to integrate vuejs 3 to an existing project which uses webpack. I read about vue-loader, so I am trying to use it.
In the official documentation I have this:
Every time a new version of ...
0
votes
1
answer
845
views
Vue CLI - compile CSS files individually from directory of .scss files
I am using Vue CLI which abstracts away much of the Webpack configuration for running and building the application. This comes with some benefits, but I am at a loss as to how to create specific rules ...
1
vote
1
answer
962
views
How can I modify a Vue Loader setting in Laravel Mix?
Using Laravel Mix by the way... and trying to use Vue Apollo, it says we need to add this to babel config:
{
test: /\.vue$/,
use: [
{
...
1
vote
1
answer
292
views
How to access vuetify in dynamic single file components using http-vue-loader?
I am trying to access vuetify inside a component I dynamically get from http-vue-loader. I received an error that says vuetify components weren't registered. I then try to import the needed ...
0
votes
0
answers
1k
views
Issues with vue-loader
I ran into some issues with vue-loader while trying to create a vue project. I started out creating a project with vue init. Next up I added Firebase by running npm install firebase and adding import ...