bshiluk / vue-wordpress

Use Vue.js and the WP REST API to build WordPress themes as SPAs with dynamic routing, HMR for development, SEO enabled, and SSR capable. Demo:
http://vue-wordpress-demo.bshiluk.com
491 stars 112 forks source link

Problems with sass #54

Open kmytor opened 2 years ago

kmytor commented 2 years ago

Hi, thanks for the topic it is very good I couldn't install sass it generates errors and I tried to install many npm of scss but I manage to advance the maximum that I have advanced in this is with this error.

ERROR in ./src/app.js Module not found: Error: Can't resolve './scss/styles.scss' in 'C:\laragon\www\demo2a\wp-content\themes\vue-wordpress\src' @ ./src/app.js 5:0-28 @ multi (webpack)-dev-server/client?http://localhost:8080 (webpack)/hot/dev-server.js ./src/app.js i 「wdm」: Failed to compile.

this is my json { "name": "vue-wordpress", "private": true, "scripts": { "dev": "webpack-dev-server --env=dev", "build": "webpack --env=prod" }, "devDependencies": { "@babel/core": "^7.2.2", "axios": "^0.18.0", "babel-core": "^6.26.3", "babel-loader": "^8.0.5", "babel-preset-env": "^1.7.0", "babel-preset-stage-3": "^6.24.1", "cross-env": "^5.2.0", "css-loader": "^2.1.0", "mini-css-extract-plugin": "^0.5.0", "node-sass": "^5.0.0", "sass": "^1.54.5", "sass-loader": "^10.0.5", "vue": "^2.6.6", "vue-loader": "^15.6.2", "vue-router": "^3.0.2", "vue-style-loader": "^4.1.2", "vue-template-compiler": "^2.6.6", "vuex": "^3.1.0", "webpack": "^4.46.0", "webpack-cli": "^3.2.3", "webpack-dev-server": "^3.1.14" }, "dependencies": { "@types/sass": "^1.43.1", "@types/sass-loader": "^8.0.3" } } Thank you

jnz31 commented 2 years ago

hello! the error message states, that a certain file is missing: Can't resolve './scss/styles.scss' so this file eather does not exist, or is in the wrong place. move/create the file or remove/change its dependency in ./src/app.js

jnz31 commented 2 years ago

and another hint right at you: check out this repo, it uses the current vue 3. you might bump it’s versions to latest, but it’s better to work with the current iteration of vue..