Why are npm install packages not working? - javascript

I am trying to deploy the following git repo locally:
https://github.com/maxie112/gatsby-ecommerce-theme
I am following the exact instructions on Mac OS.
These are the error logs;
maxdenhoed#m1-macbook-pro gatsby-ecommerce-theme % sudo npm install
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-server-dom-webpack#0.0.0-experimental-c8b778b7f-20220825
npm WARN Found: react#18.2.0
npm WARN node_modules/react
npm WARN react#"^18.0.0" from the root project
npm WARN 8 more (#gatsbyjs/reach-router, gatsby, gatsby-link, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"0.0.0-experimental-c8b778b7f-20220825" from react-server-dom-webpack#0.0.0-experimental-c8b778b7f-20220825
npm WARN node_modules/react-server-dom-webpack
npm WARN react-server-dom-webpack#"0.0.0-experimental-c8b778b7f-20220825" from gatsby#4.25.0
npm WARN node_modules/gatsby
npm WARN
npm WARN Conflicting peer dependency: react#0.0.0-experimental-c8b778b7f-20220825
npm WARN node_modules/react
npm WARN peer react#"0.0.0-experimental-c8b778b7f-20220825" from react-server-dom-webpack#0.0.0-experimental-c8b778b7f-20220825
npm WARN node_modules/react-server-dom-webpack
npm WARN react-server-dom-webpack#"0.0.0-experimental-c8b778b7f-20220825" from gatsby#4.25.0
npm WARN node_modules/gatsby
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-side-effect#2.1.1
npm WARN Found: react#18.2.0
npm WARN node_modules/react
npm WARN react#"^18.0.0" from the root project
npm WARN 8 more (#gatsbyjs/reach-router, gatsby, gatsby-link, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^16.3.0 || ^17.0.0" from react-side-effect#2.1.1
npm WARN node_modules/react-side-effect
npm WARN react-side-effect#"^2.1.0" from react-helmet#6.1.0
npm WARN node_modules/react-helmet
npm WARN
npm WARN Conflicting peer dependency: react#17.0.2
npm WARN node_modules/react
npm WARN peer react#"^16.3.0 || ^17.0.0" from react-side-effect#2.1.1
npm WARN node_modules/react-side-effect
npm WARN react-side-effect#"^2.1.0" from react-helmet#6.1.0
npm WARN node_modules/react-helmet
npm WARN deprecated querystring#0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated puppeteer#7.1.0: Version no longer supported. Upgrade to #latest
npm WARN deprecated devcert#1.2.0: critical regex denial of service bug fixed in 1.2.1 patch
npm WARN deprecated babel-eslint#10.1.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated async-cache#1.1.0: No longer maintained. Use [lru-cache](http://npm.im/lru-cache) version 7.6 or higher, and provide an asynchronous `fetchMethod` option.
npm WARN deprecated debug#4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup '/Users/maxdenhoed/Documents/1. Projects/GoReach/website2/gatsby-ecommerce-theme/node_modules/msgpackr-extract',
npm WARN cleanup [Error: ENOTEMPTY: directory not empty, rmdir '/Users/maxdenhoed/Documents/1. Projects/GoReach/website2/gatsby-ecommerce-theme/node_modules/msgpackr-extract'] {
npm WARN cleanup errno: -66,
npm WARN cleanup code: 'ENOTEMPTY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: '/Users/maxdenhoed/Documents/1. Projects/GoReach/website2/gatsby-ecommerce-theme/node_modules/msgpackr-extract'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup '/Users/maxdenhoed/Documents/1. Projects/GoReach/website2/gatsby-ecommerce-theme/node_modules/sharp',
npm WARN cleanup [Error: ENOTEMPTY: directory not empty, rmdir '/Users/maxdenhoed/Documents/1. Projects/GoReach/website2/gatsby-ecommerce-theme/node_modules/sharp'] {
npm WARN cleanup errno: -66,
npm WARN cleanup code: 'ENOTEMPTY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: '/Users/maxdenhoed/Documents/1. Projects/GoReach/website2/gatsby-ecommerce-theme/node_modules/sharp'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup '/Users/maxdenhoed/Documents/1. Projects/GoReach/website2/gatsby-ecommerce-theme/node_modules/sharp',
npm WARN cleanup [Error: ENOTEMPTY: directory not empty, rmdir '/Users/maxdenhoed/Documents/1. Projects/GoReach/website2/gatsby-ecommerce-theme/node_modules/sharp'] {
npm WARN cleanup errno: -66,
npm WARN cleanup code: 'ENOTEMPTY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: '/Users/maxdenhoed/Documents/1. Projects/GoReach/website2/gatsby-ecommerce-theme/node_modules/sharp'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path /Users/maxdenhoed/Documents/1. Projects/GoReach/website2/gatsby-ecommerce-theme/node_modules/puppeteer
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! The chromium binary is not available for arm64.
npm ERR! If you are on Ubuntu, you can install with:
npm ERR!
npm ERR! sudo apt install chromium
npm ERR!
npm ERR!
npm ERR! sudo apt install chromium-browser
npm ERR!
npm ERR! /Users/maxdenhoed/Documents/1. Projects/GoReach/website2/gatsby-ecommerce-theme/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:115
npm ERR! throw new Error();
npm ERR! ^
npm ERR!
npm ERR! Error
npm ERR! at /Users/maxdenhoed/Documents/1. Projects/GoReach/website2/gatsby-ecommerce-theme/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:115:27
npm ERR! at FSReqCallback.oncomplete (node:fs:207:21)
npm ERR!
npm ERR! Node.js v18.13.0
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/maxdenhoed/.npm/_logs/2023-01-07T08_56_09_427Z-debug-0.log
My two cents:
It looks like there was an error while trying to install the sharp and msgpackr-extract packages, which may be causing issues with your npm package installation. The error message mentions that the directories for these packages could not be removed because they were not empty.
One potential cause for this error could be that these directories were not properly cleaned up during a previous installation attempt, and there are still files present in them. Another possibility is that some processes or programs may be holding onto files in these directories, preventing them from being deleted.
Please help

As you said, some processes prevent the cleanup. Most likely Chromedriver or Chrome in this case.
I would close them manually via the command line and redo the installation.
As you're on Mac, maybe something like:
killall chromedriver
killall chromium
might be enough.

Related

Brand New Macbook Pro Having Trouble Running Gatsby Theme Apollo Docs

I can't seem to get this project running on my new Macbook Pro:
https://github.com/apollographql/gatsby-theme-apollo/tree/main/packages/gatsby-theme-apollo-docs
This is the command to run:
npm install gatsby-theme-apollo-docs
I get all of these "could not resolve dependency" warnings, I have tried running:
npm audit fix
and
npm audit fix --force
But still cannot get this project to run. This is what it says when I run it:
#MBP16inch2021 test % sudo npm install gatsby-theme-apollo-docs
Password:
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: gatsby-theme-apollo-docs#5.3.1
npm WARN Found: react#16.14.0
npm WARN node_modules/gatsby-theme-apollo-docs/node_modules/react
npm WARN peer react#"^0.14.0 || ^15.0.0 || ^16.0.0" from recompose#0.30.0
npm WARN node_modules/gatsby-theme-apollo-docs/node_modules/recompose
npm WARN recompose#"^0.30.0" from gatsby-theme-apollo-docs#5.3.1
npm WARN node_modules/gatsby-theme-apollo-docs
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#">=16.9.0" from gatsby-theme-apollo-docs#5.3.1
npm WARN node_modules/gatsby-theme-apollo-docs
npm WARN gatsby-theme-apollo-docs#"^5.3.1" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-use#9.12.0
npm WARN Found: react#17.0.2
npm WARN node_modules/react
npm WARN react#"^17.0.2" from the root project
npm WARN 18 more (#apollo/space-kit, #emotion/core, #emotion/styled, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^16.8.0" from react-use#9.12.0
npm WARN node_modules/gatsby-theme-apollo-core/node_modules/react-use
npm WARN react-use#"^9.11.0" from gatsby-theme-apollo-core#3.0.35
npm WARN node_modules/gatsby-theme-apollo-core
npm WARN
npm WARN Conflicting peer dependency: react#16.14.0
npm WARN node_modules/react
npm WARN peer react#"^16.8.0" from react-use#9.12.0
npm WARN node_modules/gatsby-theme-apollo-core/node_modules/react-use
npm WARN react-use#"^9.11.0" from gatsby-theme-apollo-core#3.0.35
npm WARN node_modules/gatsby-theme-apollo-core
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-use#9.12.0
npm WARN Found: react-dom#17.0.2
npm WARN node_modules/react-dom
npm WARN peer react-dom#">=16.8" from #tippyjs/react#4.2.5
npm WARN node_modules/#tippyjs/react
npm WARN #tippyjs/react#"^4.0.0" from #apollo/space-kit#5.6.3
npm WARN node_modules/#apollo/space-kit
npm WARN 11 more (apollo-algolia-autocomplete, framer-motion, gatsby, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom#"^16.8.0" from react-use#9.12.0
npm WARN node_modules/gatsby-theme-apollo-core/node_modules/react-use
npm WARN react-use#"^9.11.0" from gatsby-theme-apollo-core#3.0.35
npm WARN node_modules/gatsby-theme-apollo-core
npm WARN
npm WARN Conflicting peer dependency: react-dom#16.14.0
npm WARN node_modules/react-dom
npm WARN peer react-dom#"^16.8.0" from react-use#9.12.0
npm WARN node_modules/gatsby-theme-apollo-core/node_modules/react-use
npm WARN react-use#"^9.11.0" from gatsby-theme-apollo-core#3.0.35
npm WARN node_modules/gatsby-theme-apollo-core
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #reach/router#1.3.4
npm WARN Found: react#17.0.2
npm WARN node_modules/react
npm WARN react#"^17.0.2" from the root project
npm WARN 18 more (#apollo/space-kit, #emotion/core, #emotion/styled, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"15.x || 16.x || 16.4.0-alpha.0911da3" from #reach/router#1.3.4
npm WARN node_modules/gatsby/node_modules/#reach/router
npm WARN #reach/router#"^1.3.4" from gatsby#2.32.13
npm WARN node_modules/gatsby
npm WARN 2 more (gatsby-link, gatsby-react-router-scroll)
npm WARN
npm WARN Conflicting peer dependency: react#16.14.0
npm WARN node_modules/react
npm WARN peer react#"15.x || 16.x || 16.4.0-alpha.0911da3" from #reach/router#1.3.4
npm WARN node_modules/gatsby/node_modules/#reach/router
npm WARN #reach/router#"^1.3.4" from gatsby#2.32.13
npm WARN node_modules/gatsby
npm WARN 2 more (gatsby-link, gatsby-react-router-scroll)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #reach/router#1.3.4
npm WARN Found: react-dom#17.0.2
npm WARN node_modules/react-dom
npm WARN peer react-dom#">=16.8" from #tippyjs/react#4.2.5
npm WARN node_modules/#tippyjs/react
npm WARN #tippyjs/react#"^4.0.0" from #apollo/space-kit#5.6.3
npm WARN node_modules/#apollo/space-kit
npm WARN 11 more (apollo-algolia-autocomplete, framer-motion, gatsby, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom#"15.x || 16.x || 16.4.0-alpha.0911da3" from #reach/router#1.3.4
npm WARN node_modules/gatsby/node_modules/#reach/router
npm WARN #reach/router#"^1.3.4" from gatsby#2.32.13
npm WARN node_modules/gatsby
npm WARN 2 more (gatsby-link, gatsby-react-router-scroll)
npm WARN
npm WARN Conflicting peer dependency: react-dom#16.14.0
npm WARN node_modules/react-dom
npm WARN peer react-dom#"15.x || 16.x || 16.4.0-alpha.0911da3" from #reach/router#1.3.4
npm WARN node_modules/gatsby/node_modules/#reach/router
npm WARN #reach/router#"^1.3.4" from gatsby#2.32.13
npm WARN node_modules/gatsby
npm WARN 2 more (gatsby-link, gatsby-react-router-scroll)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-side-effect#1.2.0
npm WARN Found: react#17.0.2
npm WARN node_modules/react
npm WARN react#"^17.0.2" from the root project
npm WARN 18 more (#apollo/space-kit, #emotion/core, #emotion/styled, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0" from react-side-effect#1.2.0
npm WARN node_modules/react-helmet/node_modules/react-side-effect
npm WARN react-side-effect#"^1.1.0" from react-helmet#5.2.1
npm WARN node_modules/react-helmet
npm WARN
npm WARN Conflicting peer dependency: react#16.14.0
npm WARN node_modules/react
npm WARN peer react#"^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0" from react-side-effect#1.2.0
npm WARN node_modules/react-helmet/node_modules/react-side-effect
npm WARN react-side-effect#"^1.1.0" from react-helmet#5.2.1
npm WARN node_modules/react-helmet
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: create-react-context#0.3.0
npm WARN Found: react#17.0.2
npm WARN node_modules/react
npm WARN react#"^17.0.2" from the root project
npm WARN 18 more (#apollo/space-kit, #emotion/core, #emotion/styled, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^0.14.0 || ^15.0.0 || ^16.0.0" from create-react-context#0.3.0
npm WARN node_modules/gatsby/node_modules/#reach/router/node_modules/create-react-context
npm WARN create-react-context#"0.3.0" from #reach/router#1.3.4
npm WARN node_modules/gatsby/node_modules/#reach/router
npm WARN
npm WARN Conflicting peer dependency: react#16.14.0
npm WARN node_modules/react
npm WARN peer react#"^0.14.0 || ^15.0.0 || ^16.0.0" from create-react-context#0.3.0
npm WARN node_modules/gatsby/node_modules/#reach/router/node_modules/create-react-context
npm WARN create-react-context#"0.3.0" from #reach/router#1.3.4
npm WARN node_modules/gatsby/node_modules/#reach/router
up to date, audited 2746 packages in 6s
298 packages are looking for funding
run `npm fund` for details
70 vulnerabilities (4 low, 30 moderate, 36 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
I've restarted, installed latest version of node, react, etc. Just cannot seem to get this thing to run and I don't know what I'm doing with this npm audit fix stuff, but nothing has resolved it. Thanks for your help!
Edit per the comments on this post I have tried a couple new commands:
When I run
npm i react#16.14.0
I get:
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: gatsby-theme-apollo-docs#5.3.1
npm WARN Found: react#16.14.0
npm WARN node_modules/react
npm WARN peer react#"^16.13.1 || ^17.0.0" from #mdx-js/react#1.6.22
npm WARN node_modules/#mdx-js/react
npm WARN peer #mdx-js/react#"^1.0.0" from gatsby-plugin-mdx#1.10.1
npm WARN node_modules/gatsby-plugin-mdx
npm WARN 1 more (the root project)
npm WARN 21 more (gatsby, #reach/router, create-react-context, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"17.0.2" from apollo-algolia-autocomplete#1.2.1
npm WARN node_modules/apollo-algolia-autocomplete
npm WARN apollo-algolia-autocomplete#"^1.2.1" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: gatsby-theme-apollo-docs#5.3.1
npm WARN Found: react#16.14.0
npm WARN node_modules/react
npm WARN peer react#"^16.13.1 || ^17.0.0" from #mdx-js/react#1.6.22
npm WARN node_modules/#mdx-js/react
npm WARN peer #mdx-js/react#"^1.0.0" from gatsby-plugin-mdx#1.10.1
npm WARN node_modules/gatsby-plugin-mdx
npm WARN 1 more (the root project)
npm WARN 21 more (gatsby, #reach/router, create-react-context, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^0.14.0 || ^15.0.0" from recompose#0.17.0
npm WARN node_modules/recompose
npm WARN recompose#"^0.17.0" from the root project
up to date, audited 2952 packages in 3s
324 packages are looking for funding
run `npm fund` for details
62 vulnerabilities (30 moderate, 32 high)
To address issues that do not require attention, run:
npm audit fix
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
And when I run
npm i react-dom#16.14.0
I get:
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: gatsby-theme-apollo-docs#5.3.1
npm WARN Found: react-dom#16.14.0
npm WARN node_modules/react-dom
npm WARN peer react-dom#"^16.4.2 || ^17.0.0" from gatsby#2.32.13
npm WARN node_modules/gatsby
npm WARN peer gatsby#"^2.0.0" from babel-plugin-remove-graphql-queries#2.16.1
npm WARN node_modules/babel-plugin-remove-graphql-queries
npm WARN 17 more (gatsby-plugin-algolia, ...)
npm WARN 11 more (#reach/router, gatsby-link, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom#"17.0.2" from apollo-algolia-autocomplete#1.2.1
npm WARN node_modules/apollo-algolia-autocomplete
npm WARN apollo-algolia-autocomplete#"^1.2.1" from the root project
up to date, audited 2952 packages in 21s
324 packages are looking for funding
run `npm fund` for details
62 vulnerabilities (30 moderate, 32 high)
To address issues that do not require attention, run:
npm audit fix
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
First off, I see that you've used sudo in your code block above, which could cause issues, and is probably not what you want.
It seems likely to me that the issue is with peer dependency resolution. Though npm audit will flag potential vulnerabilities, but your application shouldn't fail because you haven't run it. The peer dependencies required by gatsby-theme-apollo-docs#v5.3.1 are gatsby#^2.13.80, react#>=16.9.0, and react-dom#>=16.9.0. But it seems as though you have other packages installed which have incompatible requirements on these libraries (specifically the react). For instance:
npm WARN Could not resolve dependency:
npm WARN peer react#">=16.9.0" from gatsby-theme-apollo-docs#5.3.1
npm WARN node_modules/gatsby-theme-apollo-docs
npm WARN gatsby-theme-apollo-docs#"^5.3.1" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-use#9.12.0
npm WARN Found: react#17.0.2
npm WARN node_modules/react
npm WARN react#"^17.0.2" from the root project
npm WARN 18 more (#apollo/space-kit, #emotion/core, #emotion/styled, ...)
A close reading indicates that one of the peer dependencies listed by react-use is react#17.0.2 which is incompatible with the version specified by gatsby-theme-apollo-docs.
There are two ways of approaching this problem:
You can force installation and hope that all your libraries work even if they don't all get the versions they say they need. Use the --force or --legacy-peer-deps flags when you run npm install.
You can go through the dependencies throwing warnings during install and downgrade/upgrade them until the peer dependencies of all your dependencies are actually in a compatible range.

Enzyme with react 17.0.1

I'm tryng to install this enzyme adapter for react17 and during the install throw me this error:
$ npm install --save-dev #wojtekmaj/enzyme-adapter-react-17
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react#17.0.1
npm WARN node_modules/react
npm WARN peer react#"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from mini-create-react-context#0.4.1npm WARN node_modules/mini-create-react-context
npm WARN mini-create-react-context#"^0.4.0" from react-router#5.2.0
npm WARN node_modules/react-router
npm WARN 4 more (react-router, react-router-dom, the root project, #wojtekmaj/enzyme-adapter-react-17)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0" from enzyme-adapter-utils#1.14.0
npm ERR! peer react#"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from mini-create-react-context#0.4.1npm ERR! node_modules/mini-create-react-context
npm ERR! mini-create-react-context#"^0.4.0" from react-router#5.2.0
npm ERR! node_modules/react-router
npm ERR! react-router#"5.2.0" from react-router-dom#5.2.0
npm ERR! node_modules/react-router-dom
npm ERR! react-router-dom#"^5.2.0" from the root project
npm ERR! peer react#">=15" from react-router#5.2.0
npm ERR! node_modules/react-router
npm ERR! react-router#"5.2.0" from react-router-dom#5.2.0npm ERR! node_modules/react-router-dom
npm ERR! react-router-dom#"^5.2.0" from the root project
npm ERR! 3 more (react-router-dom, the root project, #wojtekmaj/enzyme-adapter-react-17)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^0.14 || ^15.0.0 || ^16.0.0-alpha" from airbnb-prop-types#2.16.0
npm ERR! node_modules/enzyme-adapter-utils/node_modules/airbnb-prop-types
npm ERR! airbnb-prop-types#"^2.16.0" from enzyme-adapter-utils#1.14.0
npm ERR! node_modules/enzyme-adapter-utils
npm ERR! enzyme-adapter-utils#"^1.14.0" from #wojtekmaj/enzyme-adapter-react-17#0.4.1
npm ERR! node_modules/#wojtekmaj/enzyme-adapter-react-17
npm ERR! dev #wojtekmaj/enzyme-adapter-react-17#"*" from the root project
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 C:\Users\dittl\AppData\Local\npm-cache\eresolve-report.txt for a full report.
It's this a problem beacause I'm using react 17.0.1? Because in the past I work with the enzyme adapter in react 17 and works perfect.
in the link you sent, the docs say to use the legacy-peer-deps flag.
Note for npm v7 users
enzyme's dependencies have not yet been updated to declare React 17 in peerDependencies. You need to add --legacy-peer-deps to the install command for it to work correctly.
I would suggest using that in your command as such
npm install --save-dev #wojtekmaj/enzyme-adapter-react-17 --legacy-peer-deps

discord bot installing error through terminal in discord.js

I'm trying to code a Discord bot that can allow people to play chess. I've finished writing the source code and am pretty sure there are no syntax errors in it (I've checked through online js checkers). In the terminal, I ran command npm install node app.js. I got the following massive message below. As a result, when I did node app.js to get my bot online and working with the proper actions it failed.
Error:
npm WARN deprecated express#2.5.9: express 2.x series is deprecated
npm WARN deprecated connect#1.9.2: connect 1.x series is deprecated
npm WARN deprecated mkdirp#0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated request#2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/Users/daniel/Desktop/discord bot/node_modules/node/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/daniel/Desktop/discord bot/node_modules/contextify
gyp ERR! node -v v14.8.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN notsup Unsupported engine for express#2.5.9: wanted: {"node":">= 0.4.1 < 0.7.0"} (current: {"node":"14.8.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: express#2.5.9
npm WARN discord.js#11.3.2 requires a peer of bufferutil#^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.3.2 requires a peer of erlpack#discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.3.2 requires a peer of node-opus#^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.3.2 requires a peer of opusscript#^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.3.2 requires a peer of sodium#^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.3.2 requires a peer of libsodium-wrappers#^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.3.2 requires a peer of uws#^9.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN chessbot#0.0.1 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! contextify#0.1.15 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify#0.1.15 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! /Users/daniel/.npm/_logs/2020-08-21T20_14_21_590Z-debug.log

npm:ERR! A complete log of this run can be found in

i tried install vue cli.but I am getting a lot of strange errors. I searched for errors but could not find them:
linux#admin:~/Masaüstü/learn-vue$ sudo npm install vue -g
[sudo] password for linux:
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EAI_AGAIN: request to https://registry.npmjs.org/vue failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
+ vue#2.6.12
updated 1 package in 10.676s
linux#admin:~/Masaüstü/learn-vue$ vue --version
'vue' komutu sistemde bulunamadı. Ama şununla kurulabilir:
sudo snap install vue
linux#admin:~/Masaüstü/learn-vue$ npm i -g #vue/cli
npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/#vue%2fcli-ui-addon-webpack (over 30000ms)
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linux/.npm/_logs/2020-09-24T17_37_08_787Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ npm i -g vue-cli#2.9.6
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/vue-cli failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linux/.npm/_logs/2020-09-24T17_40_02_518Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ npm cache clean
npm ERR! As of npm#5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linux/.npm/_logs/2020-09-24T17_40_33_560Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ sudo npm cache clean
npm ERR! As of npm#5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-09-24T17_40_40_872Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ sudo npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.
linux#admin:~/Masaüstü/learn-vue$
I searched everything on the internet, I asked questions in many forums but unfortunately I could not find an answer. Finally, I opened the topic here hoping to find an answer.
guys please help me.Thanks
Vue namespaced their cli (from v3). Use npm i -g #vue/cli
EDIT: Check the docs for more info
here:
linux#admin:~/Masaüstü/learn-vue$ sudo npm i -g #vue/cli
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/joi#15.1.1: joi is leaving the #hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/address#2.1.4: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules/#vue/cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN #vue/compiler-sfc#3.0.0 requires a peer of vue#3.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linux/.npm/_logs/2020-09-24T18_13_12_868Z-debug.log
linux#admin:~/Masaüstü/learn-vue$ vue --version
'vue' komutu sistemde bulunamadı. Ama şununla kurulabilir:
sudo snap install vue
linux#admin:~/Masaüstü/learn-vue$
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\moham/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\moham\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\moham\AppData\Local\npm-cache_logs\2021-12-30T09_56_30_171Z-debug.log

cannot install jest because "jsdom requiring canvas"

cannot install jest..
I am attempting to install jest with npm and i am getting the following error:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^2.1.2 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN jsdom#15.2.1 requires a peer of canvas#^2.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN ws#7.2.1 requires a peer of bufferutil#^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws#7.2.1 requires a peer of utf-8-validate#^5.0.2 but none is installed. You must install peer dependencies yourself.
npm ERR! Maximum call stack size exceeded
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-02-17T07_45_50_660Z-debug.log
obviously is see there is a problem with jsdom requiring canvas
I see this post about this issue jsdom requiring canvas
that basically says to upgrade npm... it did this, but it didn't work...
Edit:
I tried to isntall canvas but i get and error:
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /c/repos/sandbox/css-vue-webpack/css-vue-webpack/node_modules/#babel/traverse/node_modules/ms
npm ERR! dest /c/repos/sandbox/css-vue-webpack/css-vue-webpack/node_modules/needle/node_modules/ms
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/c/repos/sandbox/css-vue-webpack/css-vue-webpack/node_modules/#babel/traverse/node_modules/ms' -> '/c/repos/sandbox/css-vue-webpack/css-vue-webpack/node_modules/needle/node_modules/ms'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Categories