npm install react-native-ibm-mobilefirst --save gives me error - windows

react-native-ibm-mobilefirst#8.0.2018072413 postinstall D:\Call4Code\MyTestApp
\node_modules\react-native-ibm-mobilefirst
chmod +x scripts/postinstall.sh && ./scripts/postinstall.sh
'chmod' is not recognized as an internal or external command,
operable program or batch file.
npm WARN eslint-plugin-react-native#3.2.1 requires a peer of eslint#^3.17.0 || ^
4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fse
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-native-ibm-mobilefirst#8.0.2018072413 postinstall: chmod +x scri
pts/postinstall.sh && ./scripts/postinstall.sh
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-native-ibm-mobilefirst#8.0.2018072413 postinstall s
cript.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\shalvi_kubal\AppData\Roaming\npm-cache_logs\2018-08-16T10
_34_10_364Z-debug.log

Currently there is a workaround that I used to install the react-native-ibm-mobilefirst plugin. You can create your react native project from macOS and then install the react-native-ibm-mobilefirst plugin from there, and then copy that project folder from macOS to windows. Then run 'npm install' inside the project folder and it will work fine.

Related

Laravel8 npm run dev outputs: ERESOLVE unable to resolve dependency tree

Goal
Avoid error message.
I have been getting the following error message when I run the command npm run dev:
npm notice
npm notice New major version of npm available! 7.6.1 -> 8.1.4
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.1.4
npm notice Run npm install -g npm#8.1.4 to update!
npm notice
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: acorn#7.4.1
npm ERR! node_modules/acorn
npm ERR! acorn#"^7.0.0" from acorn-node#1.8.2
npm ERR! node_modules/acorn-node
npm ERR! acorn-node#"^1.6.1" from detective#5.2.0
npm ERR! node_modules/detective
npm ERR! detective#"^5.2.0" from tailwindcss#2.2.19
npm ERR! node_modules/tailwindcss
npm ERR! dev tailwindcss#"^2.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional acorn#"^8.5.0" from terser#5.10.0
npm ERR! node_modules/terser
npm ERR! terser#"^5.9.0" from laravel-mix#6.0.39
npm ERR! node_modules/laravel-mix
npm ERR! dev laravel-mix#"^6.0.6" from the root project
npm ERR! terser#"^5.7.2" from terser-webpack-plugin#5.2.5
npm ERR! node_modules/terser-webpack-plugin
npm ERR! terser-webpack-plugin#"^5.2.4" from laravel-mix#6.0.39
npm ERR! node_modules/laravel-mix
npm ERR! dev laravel-mix#"^6.0.6" from the root project
npm ERR! 1 more (webpack)
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/ml/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ml/.npm/_logs/2021-12-02T07_41_55_149Z-debug.log
Quick Solution:
I can avoid the problem / error message with the following command:
npm install --legacy-peer-deps.
Output:
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
added 807 packages, and audited 808 packages in 12s
84 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Question
What do I have to do to run npm install again without getting the error message?
I have the same issue too. I have fixed it using this line
npm i acorn --dev
then run again
npm install && install run dev
npm install npm#latest -g
then
npm install webpack-dev-server --save-dev
working for me
If you are using Laravel Homestead Package for any Vagrant Environment, then don't run the command inside the Vagrant Project Directory.
Go outside to the local directory of the project and run these commands.
image of commands inside vagrant
You should run these here::
image of commands outside vagrant

Can't install Laravel nova custom field's npm dependencies

When I started to develop some custom field for Laravel Nova, I generated the files in the nova-components folder, but when I wanted to install npm dependencies, I got an error:
npm ERR! code 1
npm ERR! path /var/www/pafi/nova-components/Json/node_modules/pngquant-bin
npm ERR! command failed
npm ERR! command sh -c node lib/install.js
npm ERR! ⚠ The `/var/www/pafi/nova-components/Json/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
npm ERR! ⚠ pngquant pre-build test failed
npm ERR! ℹ compiling from source
npm ERR! ✔ pngquant pre-build test passed successfully
npm ERR! ✖ Error: pngquant failed to build, make sure that libpng-dev is installed
npm ERR! at /var/www/pafi/nova-components/Json/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11
npm ERR! at processTicksAndRejections (internal/process/task_queues.js:97:5)
npm ERR! at async Promise.all (index 0)
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pinasen/.npm/_logs/2021-06-22T14_23_05_831Z-debug.log
When I wanted to install the libpng-dev package, I got another error:
$ sudo apt install libpng-dev
The following packages have unmet dependencies:
libpng-dev : Depends: zlib1g-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
So I can't create custom fields.
Laravel --> 8.48.0
Laravel Nova --> 3.23.1
Ubuntu --> 20.04.2 LTS

when i am trying to install npm install gulp -D in cmd prompt there many errors displaying

node verison:v12.4.0
npm verison:6.13.4
laravel:5.8
Build failed with error code: 1
npm WARN The package popper.js is included as both a dev and production depende
cy.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules\fs
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents
1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"
)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.11.0 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.11.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional lo
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\CLOUD TIMON\AppData\Roaming\npm-cache_logs\2019-12-31T05
00_45_654Z-debug.log
first try to clean npm cache with :
npm cache clean --force
then delete node_modules folder completely, then again run npm install.
that should solve the problem.

npm install error - SKIPPING OPTIONAL DEPENDENCY

I'm trying to follow an online course of laravel with laragon. I need to run the command npm install, but it marks an error and I don't know how to fix it.
I tried to modify the path but that did not work
C:\laragon\www\social>npm install
"CALL "C:\laragon\nodejs\\node.exe" "C:\laragon\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
> node-sass#4.11.0 install C:\laragon\www\social\node_modules\node-sass
> node scripts/install.js
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN img-loader#3.0.1 requires a peer of imagemin#^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! file C:\Windows\system32\cmd.exe;C:\Users\Caribay\Anaconda3\Library\bin\graphviz;C:\Users\Caribay\AppData\Roaming\npm
npm ERR! path C:\Windows\system32\cmd.exe;C:\Users\Caribay\Anaconda3\Library\bin\graphviz;C:\Users\Caribay\AppData\Roaming\npm
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn C:\Windows\system32\cmd.exe;C:\Users\Caribay\Anaconda3\Library\bin\graphviz;C:\Users\Caribay\AppData\Roaming\npm
npm ERR! node-sass#4.11.0 install: `node scripts/install.js`
npm ERR! spawn C:\Windows\system32\cmd.exe;C:\Users\Caribay\Anaconda3\Library\bin\graphviz;C:\Users\Caribay\AppData\Roaming\npm ENOENT
npm ERR!
npm ERR! Failed at the node-sass#4.11.0 install 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\Caribay\AppData\Roaming\npm-cache\_logs\2019-01-22T03_32_49_327Z-debug.log
I hope with this command works correctly but it marks these errors, help me, please
P.S: I work on a laptop with windows 7 home premium.
$ npm cache clean --force
delete node_modules by $ rm -rf node_modules
$ npm install
And then start it again with $ npm start
I think you should install manually ajv package or update it to version 6.0 if you already have a lower version
npm i ajv
i had a similar issue. after updating it works fine. Try doing same for other errors also.

Mac npm erroring with ENOENT

I'm a recent convert to Mac from Windows, and currently just trying to get my tools setup.
I first installed node using homebrew, which was giving me errors (same as what I still have). I later removed node using homebrew and installed using the pkg from the node website.
I can access node in the command line and npm. The problem is when I try to install modules on the project locally I get something like:
npm install grunt-contrib
Error extracting archive { [Error: ENOENT, open '/Users/davidmckeown/dev/adt-com/node_modules/grunt-contrib/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/tmp/phantomjs-1.7.0-macosx.zip']
errno: 34,
code: 'ENOENT',
path: '/Users/davidmckeown/dev/adt-com/node_modules/grunt-contrib/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/tmp/phantomjs-1.7.0-macosx.zip' }
Another message just above that contains:
npm ERR! phantomjs#0.2.6 install: `node install.js`
npm ERR! `sh "-c" "node install.js"` failed with 8
npm ERR!
npm ERR! Failed at the phantomjs#0.2.6 install script.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 12.2.1
npm ERR! command "node" "/usr/local/bin/npm" "install" "grunt-contrib"
npm ERR! cwd /Users/davidmckeown/dev/adt-com
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR! code ELIFECYCLE
Any help figuring out what is causing problems here would be fantastic. This happens with other modules too, from what I can tell.
npm cache clean
or if installed under su
sudo npm cache clean
There was an issue 5 months ago with grunt qunit package - https://github.com/gruntjs/grunt-lib-phantomjs/issues/5.
Try to install this specific package:
sudo npm install grunt-contrib-qunit
The package that you installed is a bundle of many packages. The qunit package version was not updated explicitly to the latest version in this bundle, that's why clearing the npm cache might solve this issue.

Resources