trying to install sass and getting an error about the webpack - sass

I am trying to install sass in a Vue project, I'm getting an error so I've tried to --force, even though I was able to see sass-loader in devDependencies when npm run serve I am getting an error about lang="sass", so I decided to npm uninstall sass-loader and node-sass, so I am starting again.
What should I do?
my error

wasn't to diffucult, because I am using zsh in my terminal I had to wrap in quotation
zsh: npm install -D 'sass-loader#^10' sass
and that's it

Related

Tailwind CSS Laravel Mix Error - Forces PostCSS 8 to be installed

I recently created a new laravel 8 project using Breeze for the authentication and tailwind css. All worked perfectly when running npm run watch but once I run npm run prod I ran into errors. I noticed that the Tailwind docs mention that there are PostCSS issues so you need to unistall and run
npm install tailwindcss#npm:#tailwindcss/postcss7-compat #tailwindcss/postcss7-compat postcss#^7 autoprefixer#^9
I done that however every time I run npm run prod now the build quits at 98% and says
Additional dependencies must be installed. This will only take a moment.
Running: npm install postcss#^8.1 --save-dev --legacy-peer-deps
npm WARN browser-sync-webpack-plugin#2.2.2 requires a peer of webpack#^1 || ^2 || ^3 || ^4 but none is installed. You must install peer dependencies yourself.
Finished. Please run Mix again.
This auto updates PostCSS to 8.1 every time.
After that if I run npm run prod again it does the exact same message over and over.
I've tried removing the browsersync plugins and trying again but it still doesn't work.
Anyone ran into this or got a solution?
laravel-mix v6 now supports PostCSS8
According to tailwind docs, it suggests to use npm install tailwindcss#npm:#tailwindcss/postcss7-compat #tailwindcss/postcss7-compat postcss#^7 autoprefixer#^9
With the new Mix v6, run npm install tailwindcss#latest postcss#latest autoprefixer#latest
After this, npm run prod will run the way it should.
you must upgrade laravel mix using the following command
npm install laravel-mix#latest
As Digvijay mentioned above the new Mix v6 now supports PostCSS 8. So run:
npm install tailwindcss#latest postcss#latest autoprefixer#latest
After the when you run npm run prod you will still get this message:
Additional dependencies must be installed. This will only take a moment.
Running: npm install browser-sync browser-sync-webpack-plugin#2.2.2 --save-dev --legacy-peer-deps
npm WARN browser-sync-webpack-plugin#2.2.2 requires a peer of webpack#^1 || ^2 || ^3 || ^4 but none is installed. You must install peer dependencies yourself.
Finished. Please run Mix again.
To fix this just add sudo to the front of the npm command it ran:
sudo npm install browser-sync browser-sync-webpack-plugin#2.2.2 --save-dev --legacy-peer-deps
Now run npm run prod and it should work!

NPM run watch resulting in error Laravel 5.7

I am receiving this error when I try to run npm run watch
Error: Cannot find module 'C:\wamp64\www\node_modules\laravel-mix\setup\webpack.config.js'
I am currently using
Laravel Framework 5.7.16
NPM 6.4.1
Thank you in advance
Edit: yes, I have run npm install
You have to first install your node modules with:
npm install
It seems that you don't have the package Laravel-mix, install it running:
npm install laravel-mix --save-dev
Also check if you have your webpack.config.js inside the main folder of your app, if not check for the docs on how to get it: https://laravel-mix.com/docs/3.0/installation

Error executing "npm run" in fresh laravel file - Cannot find module npm-cli.js

Can someone help me on this? I'm getting error below when executing the npm run on my fresh laravel project.
I've installed new laravel file larave new vue-lar-proj
then installed modules npm install
then immediately tried to execute npm run watch I'm getting error below.
But when I tried installing the laravel file using this command
composer create-project --prefer-dist laravel/laravel vue-lar-proj "5.5.*"
I've got no problem executing the npm run watch.
I only get the error on npm run dev and npm run prod
I'm new on this, appreciate your help in advance.
I had this problem. I found out that node_modules folder did not exist. So I created this folder by:
$ npm install
I didn't install npm-cli globally. So tried to install npm-cli:
$ npm install npm-cli

Why SCSS compile error in atom?

I need help! I installed sass-autocompile in Atom. Created .scss file. But I have error when I want to compile it.
The problem is that node-sass is not installed in your system, you need to install (globally, so any application or command line execution could reference it without the full path to the binary file) it by running the following command:
npm install -g node-sass
Read more about installing node packages globally here.
Hope it helps.
Try to install node-sass globally. npm node sass
Install:
$ npm install -g node-sass
Check in command line:
$ node-sass -v

Gulp global install doesn't work on Windows 7

I am trying to install Gulp globally on a Windows 7 PC. In a command prompt I ran npm install gulp -gand it ran without any errors, although it did return the following warnings:
npm WARN install Couldn't install optional dependency: Failed to parse json
npm WARN install No data, empty input at 1:1
npm WARN install
npm WARN install ^
When I try to run gulp it says it is not recognized as an internal command.
If I check the %AppData%/npm directory, gulp.cmd is not there. Looking at all the answers to gulp command not found - error after installing gulp, I take it this is where it should be.
Any ideas what has gone wrong, or where I can look to see what has gone wrong?
When I tried to do a local install of gulp: npm install gulp, it actually showed an error:
Failed to Parse json... File:
C:\Users\username|AppData\Roaming\npm-cache\clone\1.0.2\package\package.json
When I deleted this file and retried the Global install, it then worked.

Resources