Problem with warnings after compiling assets - laravel

When I compile assets with command npm run prod, I'm receiving this message:
WARNING Compiled with 2 warnings
warning in ./resources/sass/app.scss
Module Warning (from ./node_modules/postcss-loader/src/index.js):
Warning
(1973:3) Error in parsing SVG: Non-whitespace before first tag. Line:
0 Column: 1 Char: d
# ./resources/sass/app.scss 2:14-253
warning in ./resources/sass/app.scss
Module Warning (from ./node_modules/postcss-loader/src/index.js):
Warning
(2084:3) Error in parsing SVG: Non-whitespace before first tag. Line:
0 Column: 1 Char: d
# ./resources/sass/app.scss 2:14-253
after this warning I get list of compiled files, and after that the warnings again. This time they seems to be more precise:
WARNING in ./resources/sass/app.scss
(./node_modules/css-loader??ref--5-2!./node_modules/postcss-loader/src??postcss0!./node_modules/resolve-url-loader??ref--5-4!./node_modules/sass-loader/dist/cjs.js??ref--5-5!./resources/sass/app.scss)
Module Warning (from ./node_modules/postcss-loader/src/index.js):
Warning
(1973:3) Error in parsing SVG: Non-whitespace before first tag. Line:
0 Column: 1 Char: d # ./resources/sass/app.scss 2:14-253
WARNING in ./resources/sass/app.scss
(./node_modules/css-loader??ref--5-2!./node_modules/postcss-loader/src??postcss0!./node_modules/resolve-url-loader??ref--5-4!./node_modules/sass-loader/dist/cjs.js??ref--5-5!./resources/sass/app.scss)
Module Warning (from ./node_modules/postcss-loader/src/index.js):
Warning
(2084:3) Error in parsing SVG: Non-whitespace before first tag. Line:
0 Column: 1 Char: d # ./resources/sass/app.scss 2:14-253
When I compile assets with "npm run dev" there is no warnings after process.
Anyone have idea what's causing this behavior ?
app.scss content:
#use 'sass:math';
#use 'sass:list';
#import "compile/bootstrap";
#import "compile/bootstrap_limitless";
#import "compile/layout";
#import "compile/components";
#import "compile/colors";
#import "datatables";
#import "forms";
#import "daterangepicker";

I finally found the solution. SVGO package from Cssnano was the problem.
To fix this just add to mix.options (in webpack.mix.js file) following lines:
mix.options({
cssNano: {
svgo: false
}
});
That's all.

Related

Nuxt build errors (sass loader related?) when running run build but run dev compiles

My repo for anyone to have a look: https://gitlab.com/gkurl/vapedcrusader
Node version 16.18.1.
Getting a nuxt build error when I run yarn run build (dev works fine):
ERROR in ./components/AppNavigation.vue?vue&type=style&index=0&id=15d18dee&prod&lang=scss& (./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--7-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--7-oneOf-1-3!./node_modules/#nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/AppNavigation.vue?vue&type=style&index=0&id=15d18dee&prod&lang=scss&)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
ParserError: Syntax Error at line: 1, column 23
at /Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/components/AppNavigation.vue:1:198660
at Parser.error (/Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss-values-parser/lib/parser.js:127:11)
at Parser.operator (/Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss-values-parser/lib/parser.js:162:20)
at Parser.parseTokens (/Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss-values-parser/lib/parser.js:245:14)
at Parser.loop (/Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss-values-parser/lib/parser.js:132:12)
at Parser.parse (/Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss-values-parser/lib/parser.js:51:17)
at parse (/Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss-custom-properties/index.cjs.js:47:30)
at /Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss-custom-properties/index.cjs.js:333:24
at /Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss/lib/container.js:194:18
at /Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss/lib/container.js:139:18
at Rule.each (/Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss/lib/container.js:105:16)
at Rule.walk (/Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss/lib/container.js:135:17)
at /Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss/lib/container.js:152:24
at Root.each (/Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss/lib/container.js:105:16)
at Root.walk (/Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss/lib/container.js:135:17)
at Root.walkDecls (/Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss/lib/container.js:192:19)
at transformProperties (/Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss-custom-properties/index.cjs.js:330:8)
at Object.syncTransform [as plugin] (/Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss-custom-properties/index.cjs.js:522:5)
at /Users/gkurl/Documents/vapedcrusader-frontend/vapedcrusader/node_modules/postcss-preset-env/index.js:459:97
# ./components/AppNavigation.vue?vue&type=style&index=0&id=15d18dee&prod&lang=scss& (./node_modules/vue-style-loader??ref--7-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--7-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--7-oneOf-1-3!./node_modules/#nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/AppNavigation.vue?vue&type=style&index=0&id=15d18dee&prod&lang=scss&) 4:14-450
# ./components/AppNavigation.vue?vue&type=style&index=0&id=15d18dee&prod&lang=scss&
# ./components/AppNavigation.vue
# ./layouts/default.vue
# ./.nuxt/App.js
# ./.nuxt/index.js
# ./.nuxt/client.js
# multi ./node_modules/#nuxt/components/lib/installComponents.js ./.nuxt/client.js
FATAL Nuxt build error 12:39:57
at WebpackBundler.webpackCompile (node_modules/#nuxt/webpack/dist/webpack.js:2127:21)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async WebpackBundler.build (node_modules/#nuxt/webpack/dist/webpack.js:2076:5)
at async Builder.build (node_modules/#nuxt/builder/dist/builder.js:327:5)
at async Object.run (node_modules/#nuxt/cli/dist/cli-build.js:110:7)
at async NuxtCommand.run (node_modules/#nuxt/cli/dist/cli-index.js:413:7)
Tried different sass-loader tweaks etc. Not to sure what the issue is. Any insight would be appreciated.

Laravel vue - error Delete `␍` prettier/prettier , potentially fixable with the `--fix` option

npm run watch returing this error
181 problems (181 errors, 0 warnings)
181 errors and 0 warnings potentially fixable with the --fix option.
# ./resources/js/backend/router/index.js 15:0-41 160:21-29
# ./resources/js/backend/app.js
# multi ./resources/js/backend/app.js ./resources/sass/backend/app.scss
ERROR in ./resources/js/vue-i18n-config.js
Module Error (from ./node_modules/eslint-loader/index.js):
\resources\js\vue-i18n-config.js
1:4 error Delete `␍` prettier/prettier
2:18 error Delete `␍` prettier/prettier
3:4 error Delete `␍` prettier/prettier
4:22 error Delete `␍` prettier/prettier
5:1 error Delete `␍` prettier/prettier
6:4 error Delete `␍` prettier/prettier
Possibly this help you: Set "endOfLine":"auto" in your `.prettierrc` file then restart server and run npm run lint -- --fix.
Try this probably it will help you.
Create this file '.prettierrc.js' in your root directory. And add this code in that file.
module.exports = { semi: false, trailingComma: "all", singleQuote: true, tabWidth: 4 };
Open VScode preferences -> setting -> Edit in setting.json
And add this code "files.eol": "\r\n",
Open this file '.eslintrc.js', and add this code
rules: {'prettier/prettier': ['off', { singleQuote: true }]},
Before running the server, run this npx prettier --write . '!**/*.{js,jsx,vue}', after execute this run, start the server.

Objective Sharpie - Automated Binding of AWSCognito fails with "'AWSCore/AWSCore.h' file not found"

I'm trying to bind "AWSCognito" using Sharpie and Cocoapods using following command:
sharpie pod init -force ios AWSCognito && sharpie pod bind
It ran good but build was failed with following errors:
Parsing 1 header files...
While building module 'AWSCognito' imported from /private/var/folders/0r/y26zbgwn7kx_vn2gr8qjztlm0000gp/T/com.xamarin.ObjectiveSharpie/83195091ba274dc1817fbb79ea9f60ad.h:1:
In file included from :1:
In file included from _ usr /build/Release-iphoneos/AWSCognito/AWSCognito.framework/Headers/AWSCognito-umbrella.h:3:
In file included from _ _usr /build/Release-iphoneos/AWSCognito/AWSCognito.framework/Headers/AWSCognito.h:26:
_ _usr _/build/Release-iphoneos/AWSCognito/AWSCognito.framework/Headers/AWSCognitoService.h:19:9: fatal error:
'AWSCore/AWSCore.h' file not found
#import <AWSCore/AWSCore.h>
^
/private/var/folders/0r/y26zbgwn7kx_vn2gr8qjztlm0000gp/T/com.xamarin.ObjectiveSharpie/83195091ba274dc1817fbb79ea9f60ad.h:1:9: fatal error:
could not build module 'AWSCognito'
#import AWSCognito;
~~~~^~~~~~
Binding...
2 errors generated.
Error while processing /private/var/folders/0r/y26zbgwn7kx_vn2gr8qjztlm0000gp/T/com.xamarin.ObjectiveSharpie/83195091ba274dc1817fbb79ea9f60ad.h.
Submitting usage data to Xamarin...
Submitted - thank you for helping to improve Objective Sharpie!
Done. Exiting with error code 1.
error: Clang failed to parse input and exited with code 1```
I can't figure out why and how do I solve this issue. Any help is appreciated. Thanks.

sass error when trying to run gulp local webserver

I have node.js and gulp.js installed, npm install works fine but then when I try to run the gulp local webserver it stops at 'sass' with the error messages below.
I have tried uninstalling node.js and gulp.js as well as wiping out the node_modules folder and running npm install again but no luck yet. Any suggestions?
[09:50:25] Starting 'generate-sass-index'...
[09:50:26] Finished 'generate-sass-index' after 68 ms
[09:50:26] Starting 'sass'...
[09:50:26] SOURCE CODE ERROR
[09:50:26] formatted Error: You may not #extend an outer selector from within #media.
You may only #extend selectors within the same directive.
From "#extend .col-md-6" on line 134 of LocalDistribution/sass/ItemDetails/_item-details.scss
on line 11 of LocalDistribution/sass/twitter-bootstrap-sass/mixins/_grid-framework.scss
>>
[09:50:26] message LocalDistribution\sass\twitter-bootstrap-sass\mixins\_grid-framework.scss
Error: You may not #extend an outer selector from within #media.
You may only #extend selectors within the same directive.
From "#extend .col-md-6" on line 134 of LocalDistribution/sass/ItemDetails/_item-details.scss
on line 11 of LocalDistribution/sass/twitter-bootstrap-sass/mixins/_grid-framework.scss
>>
[09:50:26] column 245
[09:50:26] line 11
[09:50:26] file C:/svn/montblanc/LocalDistribution/sass/twitter-bootstrap-sass/mixins/_grid-framework.scss
[09:50:26] status 1
[09:50:26] messageFormatted LocalDistribution\sass\twitter-bootstrap-sass\mixins\_grid-framework.scss
Error: You may not #extend an outer selector from within #media.
You may only #extend selectors within the same directive.
From "#extend .col-md-6" on line 134 of LocalDistribution/sass/ItemDetails/_item-details.scss
on line 11 of LocalDistribution/sass/twitter-bootstrap-sass/mixins/_grid-framework.scss
>>
[09:50:26] name Error
[09:50:26] stack Error: LocalDistribution\sass\twitter-bootstrap-sass\mixins\_grid-framework.scss
Error: You may not #extend an outer selector from within #media.
You may only #extend selectors within the same directive.
From "#extend .col-md-6" on line 134 of LocalDistribution/sass/ItemDetails/_item-details.scss
on line 11 of LocalDistribution/sass/twitter-bootstrap-sass/mixins/_grid-framework.scss
>>
at options.error (C:\svn\montblanc\node_modules\gulp-sass\node_modules\node-sass\lib\index.js:271:32)
[09:50:26] showStack false
[09:50:26] showProperties true
[09:50:26] plugin gulp-sass
[09:50:26] Finished 'sass' after 469 ms
[09:50:26] Starting 'font-awesome'...
[09:50:26] Starting 'clean-sass-tmp'...
[09:50:26] Finished 'clean-sass-tmp' after 20 µs
events.js:85
throw er; // Unhandled 'error' event
^
Error: Checksum error in glyf

Scss compile error in jekyll does not show what line the error is in

I've trying to convert simple twitter bootstraps bootstrap.css to bootstrap.scss. But I'm getting this error
Conversion error: Jekyll::Converters::Scss encountered an error
converting'css/bootstrap.scss'.
Conversion error: Invalid CSS after "}": expected selector or at-rule, was "}"
jekyll 2.4.0 | Error: Invalid CSS after "}": expected selector or at-rule, was "}"
Is there some way to make jekyll tell me the line this error/errors is in or any other way I could track it down.
I tried just to look through everything by hand, but the file is just too massive.
I just found a site called http://csslint.net/ and just copied all of my bootstrap scss file into it and it found the error line.
I'm still confused why it did not show me this in jekyll, as I can see it in the error messages on other posts on stackoverflow

Resources