Made a repo on github here with all my files maybe someone can help me because i can’t understand why it doesn’t work(confused) Github Code
Error
ERROR in ./css/app.scss
Module build failed: ModuleBuildError: Module build failed: TypeError: this.getResolve is not a function
at Object.loader (/home/dan/Codes/blog_api/assets/node_modules/sass-loader/dist/index.js:52:26)
at /home/dan/Codes/blog_api/assets/node_modules/webpack/lib/NormalModule.js:244:20
at /home/dan/Codes/blog_api/assets/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /home/dan/Codes/blog_api/assets/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at runSyncOrAsync (/home/dan/Codes/blog_api/assets/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
at iterateNormalLoaders (/home/dan/Codes/blog_api/assets/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
at Array.<anonymous> (/home/dan/Codes/blog_api/assets/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
at Storage.finished (/home/dan/Codes/blog_api/assets/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
at /home/dan/Codes/blog_api/assets/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
at /home/dan/Codes/blog_api/assets/node_modules/graceful-fs/graceful-fs.js:115:16
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:61:3)
@ ./js/app.js 4:0-34
@ multi ./js/app.js
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!node_modules/sass-loader/dist/cjs.js!css/app.scss:
Entrypoint mini-css-extract-plugin = *
[./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./css/app.scss] 186 bytes {mini-css-extract-plugin} [built] [failed] [1 error]
ERROR in ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./css/app.scss
Module build failed: TypeError: this.getResolve is not a function
at Object.loader (/home/dan/Codes/blog_api/assets/node_modules/sass-loader/dist/index.js:52:26)
Also if you can help me with postcss to make it work I would really appreciate it.After the sass loader config works
Error again using test: /.(sass|scss)$/
ERROR in ./css/app.scss
Module build failed: ModuleBuildError: Module build failed: TypeError: this.getResolve is not a function
at Object.loader (/home/dan/Codes/blog_api/assets/node_modules/sass-loader/dist/index.js:52:26)
at /home/dan/Codes/blog_api/assets/node_modules/webpack/lib/NormalModule.js:244:20
at /home/dan/Codes/blog_api/assets/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /home/dan/Codes/blog_api/assets/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at runSyncOrAsync (/home/dan/Codes/blog_api/assets/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
at iterateNormalLoaders (/home/dan/Codes/blog_api/assets/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
at Array.<anonymous> (/home/dan/Codes/blog_api/assets/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
at Storage.finished (/home/dan/Codes/blog_api/assets/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
at /home/dan/Codes/blog_api/assets/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
at /home/dan/Codes/blog_api/assets/node_modules/graceful-fs/graceful-fs.js:115:16
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:61:3)
@ ./js/app.js 4:0-34
@ multi ./js/app.js
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js!node_modules/sass-loader/dist/cjs.js!css/app.scss:
Entrypoint mini-css-extract-plugin = *
[./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./css/app.scss] 186 bytes {mini-css-extract-plugin} [built] [failed] [1 error]
ERROR in ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./css/app.scss
Module build failed: TypeError: this.getResolve is not a function
at Object.loader (/home/dan/Codes/blog_api/assets/node_modules/sass-loader/dist/index.js:52:26)
ERROR in ./css/app.scss
Module parse failed: Unexpected character '@' (3:0)
You may need an appropriate loader to handle this file type.
| /* This file is for your main application css. */
|
| @import "./bulma.sass";
|
@ ./js/app.js 4:0-34
@ multi ./js/app.js
Can’t I import sass files in scss files?
Also thank you to everyone that helps me in advance with this config and errors
Update found this but doesn’t work for me
Also i have a loader for sass so why does a loader error pops up?
ERROR in ./css/app.scss (./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src??ref--5-2!./node_modules/fast-sass-loader/lib!./css/app.scss)
Module build failed (from ./node_modules/fast-sass-loader/lib/index.js):
Error: media query expression must begin with '('
at options.error (/home/dan/Codes/blog_api/assets/node_modules/node-sass/lib/index.js:291:26)
I’m using Buefy which installs Bulma in your node_modules but the following (untested) config should also work for you assuming you have sass-loader and node-sass installed in your package.json:
Hi @wolfiton.
I’m just a bit curious. I didn’t read the full discussion but I would like to know if your issue is just about phoenix version >= 1.4.11.
I’m using 1.4.8 and it’s working fine with both scss and sass files. I can recall that I had some hard time to get webpack correctly set. So my concern is knowing wether I will have to configure again webpack when upgrading my projects to Phoenix 1.4.11 or plus.
Ok maybe it will help you if I share my config with you? But I mean did you use Phoenix version prior to 1.4.11? Or do you just start with this version?
I started with this version for learning purposes because my interest is grapqhl and nuxt and I managed to find a config that works but wnated to try with a new biulma component to see if it really works.
Give me a couple a minutes and i should be able to push everything to github for future references for everybody.
Also thanks for the offer of sharing the config you have but i am good for now.