npm ERR! fsevents not accessible from rollup - npm

I am trying to build my Angular app on Gitlab CI, and install the dependencies with npm ci, but I encounter an error 'fsevents not accessible from rollup'. I tried npm ci --no-optional and still having this error. How do I fix this?

I have also got the same error with "#angular-devkit/build-angular": "0.1102.14". I have resolved this issue by upgrading npm from ver6 to ver7 with node ver 14
npm install -g npm

updated my angular 11 project dev dependencies to:
"#angular-builders/custom-webpack": "^11.1.1",
"#angular-devkit/build-angular": "^0.1102.13",
needed to install webpack and here we go..

Related

Could not resolve react-native peer dependency

I cloned a react native repository and I am getting the following errors when I perform npm install.
It seems like 2 packages have peer dependencies with the react-native package:
react-native-async-storage/async-storage#1.17.5
react-native-svg-icon#0.10.0
The package.json file has "react-native": "0.68.2", which seems to be compatible with what react-native-async-storage package needs (react-native#"^0.0.0-0 || 0.60 - 0.68 || 1000.0.0") and same with react-native-svg-icon#0.10.0 (react-native#"^0.64.0")
I tried --force and --legacy-peer-deps commands, some vulnerabilities are solved but same output for npm install.
Any suggestions?
When running npm install:
When running npm install --legacy-peer-deps:
When running npm install --force:
What eventually worked for me was to downgrade npm's version, in my case it was 8.3.1.

I cannot npm install with just created vue2 + vuetify proj

installed latest vue/cli and created project using vue2.
After this, I added vuetify and thats all for additional to basic vue2 template list of packages.
When I have tryed to use 'npm install'
Found: #vue/cli-service#undefined
npm ERR! node_modules/#vue/cli-service
npm ERR! dev #vue/cli-service#"5.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #vue/cli-service#"^3.0.0 || ^4.0.0 || ^5.0.0-0" from #vue/cli-plugin-babel#5.0.0
npm ERR! node_modules/#vue/cli-plugin-babel
npm ERR! dev #vue/cli-plugin-babel#"5.0.0" from the root project`
can you guys explain me meaning of error
myVersions
As you are seemingly on an old version of npm (<=6.x) you need to install the peer dependency yourself:
npm i -D #vue/cli-service#5.0.0
After installing the dependency, edit your package.json and insert this block on the top level, right after the "devDependencies" object:
"peerDependencies": {
"#vue/cli-service": "^5.0.0"
}
and remove that dependency from the "devDependencies" object.
If you don't want to deal with peer dependencies yourself, upgrade your node and npm version. To upgrade npm only:
npm i -g npm
Despite the fact that I reconfigured entire project. I will anyway answer this question.
Issue was related to cli-service 5.0.0, when I should have had 5.0.8 in order to use babel 5.0.0.
I want to add that if you use default vue.2 template with vue/cli 5.0.8,
You will get another error after installing vuetify, which was not able to fix.
Error is related to vuetify loader.
I fixed it with start up new project and manually inserting all dependencies compatible with vuetify-loader 1.5
Because 1.7 brakes npm run serve

'webpack-dev-server' is not recognized as an internal or external command,

I cloned this Webpack Starter package through github using gitbash following a tutorial on pluralsight. I am trying to access webpack through Visual Studio Code's integrated terminal but i get the following error. I am new to this so kindly help me on this.
I am running a command
Raza Zaidi#RazaZaidi-PC MINGW64 ~/webpack-starter (master)
$ npm run dev
and then following error occurs
> yet-another-webpack-es6-starterkit#1.0.0 dev C:\Users\Raza Zaidi\webpack-starter
> webpack-dev-server --open --config webpack/webpack.config.dev.js
'webpack-dev-server' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yet-another-webpack-es6-starterkit#1.0.0 dev: `webpack-dev-server --open --config webpack/webpack.config.dev.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yet-another-webpack-es6-starterkit#1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Raza Zaidi\AppData\Roaming\npm-cache\_logs\2018-08-14T20_16_29_017Z-debug.log
Webpack command should be present in location: node_modules\.bin\
In this case in package.json file we are referring to webpack-dev-server, but locally webpack-dev-server doesn't exist.
First run following command for global installation:
npm install -g webpack-dev-server
Second execute local installation command, which will create node_modules\.bin\webpack-dev-server:
npm install webpack-dev-server --save-dev
running
npm install -g webpack-dev-server
in cmd as an administrator solved my problem. I hope it helps others.
For me, instead of installing webpack-dev-server globally, I simply uninstalled and reinstalled the local package:
npm uninstall webpack-dev-server
npm install webpack-dev-server
Recent versions of Webpack & WDS need webpack-cli package, I recommend you to downloaded if your Webpack version is 4 or higher
first I've install webpack-dev-server in global
npm install -g webpack-dev-server
after installation I got this error..
Error: Cannot find module 'webpack'
this is version not matching problem, in my code I used these dependencies
"devDependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^8.2.2",
"babel-preset-es2015": "^6.24.1",
"webpack": "2.2.0-rc.3",
"webpack-cli": "^4.6.0",
"webpack-dev-server": "2.1.0-beta.0",
"webpack-validator": "^2.3.0"
},
so change webpack-dev-server version in global
npm install -g webpack-dev-server#2.1.0-beta.0
in my case this was worked
Check your node version, in my case switching to last node version helped.
I solved this problem by typing command: npm update

Node sass directory not found

Trying to run npm watch and got the above-mentioned error.
Please, how can I resolve such an issue?
Thanks
If you have not already install node-sass then install once.
npm install node-sass --no-bin-links
Or, try rebuilding node-sass, with this
npm rebuild node-sass

IntelliJ cant see npm plugins

My IntelliJ is not seeing my karma plugins:
WARN [plugin]: Cannot find plugin "karma-ng-extjs-scenario".
Did you forget to install it ?
npm install karma-ng-extjs-scenario --save-dev
WARN [plugin]: Cannot find plugin "karma-jasmine".
Did you forget to install it ?
npm install karma-jasmine --save-dev
WARN [plugin]: Cannot find plugin "karma-chrome-launcher".
Did you forget to install it ?
npm install karma-chrome-launcher --save-dev
WARN [plugin]: Cannot find plugin "karma-firefox-launcher".
Did you forget to install it ?
npm install karma-firefox-launcher --save-dev
I believe it is because i was following a tutorial that told me to install them globally.
But then i realised that i wanted to install them locally and save to the package.json.
I try again to install locally and it doesnt fix it:
$ npm install karma-jasmine --save-dev
npm WARN package.json karma-ie-launcher#0.1.5 No README data
info trying registry request attempt 1 at 21:06:11
http GET https://registry.npmjs.org/karma-jasmine
http 304 https://registry.npmjs.org/karma-jasmine
karma-jasmine#0.1.5 ../../../node_modules/karma-jasmine
I can however run karma from within my project from the command line and the plugins exist in the npm modules directory.
Is there a way to fix this or do i need to reinstall the packages from scratch? If so, what is the easiest way of doing that?
the --link flag linked the global install into the local directory.
npm install karma-jasmine --save-dev --link