error in ./resources/assets/sass/app.scss

If you are getting this error (error in ./resources/assets/sass/app.scss) in Node module please follow some steps which is have mentioned in the following

Error:-

Many of you get this error when you did not change anything in app.scss, but when I run npm run watch I get the following errors:

 error  in ./resources/sass/app.scss                                                                      

Module build failed (from ./node_modules/sass-loader/lib/loader.js):                                      
Unsupported operation: Cannot extract a file path from a URI with a fragment component                    

@ ./resources/sass/app.scss 2:14-254                                                                     

    Asset      Size   Chunks             Chunk Names                                                     
/js/app.js  2.46 MiB  /js/app  [emitted]  /js/app                                                         

ERROR in ./resources/sass/app.scss                                                                        
Module build failed (from ./node_modules/css-loader/index.js):                                            
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js):                    

undefined                                                                                                 
      ^                                                                                                  
      Join(null, "variables"): part 0 was null, but part 1 was not.                                       
@import 'variables';                                                                                      
        ^^^^^^^^^^^                                                                                       
  stdin 2:9  root stylesheet                                                                              
      in C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\resources\sass\app.scss (line 2, column 9)           
    at runLoaders (C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\webpack\lib\NormalModule.js:30
    at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\LoaderRunner.js:364:11  
    at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\LoaderRunner.js:230:18  
    at context.callback (C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\Loader
13)

Solution:-

The main issue which we have found that is related to dart-sass being used instead of node-sass with laravel

You have to just follow one step:-

Step 1:- You have to run this Command and all the things will solve .

npm install node-sass

Tagged : / / / / / / / / / /

‘cross-env’ is not recognized as an internal or external command, operable program or batch file.

Hey if you are getting some error like (‘cross-env’ is not recognized as an internal or external command, operable program or batch file.) in your Node please follow the steps which i have mentioned in following:-

You need to make cross-env working globally instead of having it in the project.

Step 1:- remove node_modules folder

Step 2:-  run this Command so that you cross-env work globally.

npm install --global cross-env

Step 3:- Remove “cross-env”: “5.0.1” from the devDependencies section of the package.json file. You may actually skip this step and keep package.json. If you’d want.

Step 4:- Then run this command.

npm install --no-bin-links

Step 5:- After this finally you can run your main command

npm run dev

Tagged : / / / / / / /