While following this training unit by Microsoft
Exercise - Use the SPFx PnP reusable property pane controls I encounter errors, any advice on how to resolve these issues?
Environment Info
Platform: Windows
nodeJS v16.18.1
npm 8.19.2
gulp CLI version: 2.3.0
gulp Local version: 4.0.2
yeoman 4.3.1
#microsoft/generator-sharepoint#1.16.1
Problem
When I execute the following command
npm install #pnp/spfx-property-controls --save --save-exact
I get this output:
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-ace#5.8.0
npm WARN Found: react#17.0.1
npm WARN node_modules/#pnp/spfx-property-controls/node_modules/react
npm WARN react#"17.0.1" from #pnp/spfx-property-controls#3.11.0
npm WARN node_modules/#pnp/spfx-property-controls
npm WARN #pnp/spfx-property-controls#"*" from the root project
npm WARN 6 more (#microsoft/sp-core-library, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0" from react-ace#5.8.0
npm WARN node_modules/#pnp/spfx-property-controls/node_modules/react-ace
npm WARN react-ace#"5.8.0" from #pnp/spfx-property-controls#3.11.0
npm WARN node_modules/#pnp/spfx-property-controls
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.1 || ^16.0.0" from react-ace#5.8.0
npm WARN node_modules/#pnp/spfx-property-controls/node_modules/react-ace
npm WARN react-ace#"5.8.0" from #pnp/spfx-property-controls#3.11.0
npm WARN node_modules/#pnp/spfx-property-controls
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-ace#5.8.0
npm WARN Found: react-dom#17.0.1
npm WARN node_modules/#pnp/spfx-property-controls/node_modules/react-dom
npm WARN react-dom#"17.0.1" from #pnp/spfx-property-controls#3.11.0
npm WARN node_modules/#pnp/spfx-property-controls
npm WARN #pnp/spfx-property-controls#"*" from the root project
npm WARN 5 more (#microsoft/sp-core-library, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom#"^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0" from react-ace#5.8.0
npm WARN node_modules/#pnp/spfx-property-controls/node_modules/react-ace
npm WARN react-ace#"5.8.0" from #pnp/spfx-property-controls#3.11.0
npm WARN node_modules/#pnp/spfx-property-controls
npm WARN
npm WARN Conflicting peer dependency: react-dom#16.14.0
npm WARN node_modules/react-dom
npm WARN peer react-dom#"^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0" from react-ace#5.8.0
npm WARN node_modules/#pnp/spfx-property-controls/node_modules/react-ace
npm WARN react-ace#"5.8.0" from #pnp/spfx-property-controls#3.11.0
npm WARN node_modules/#pnp/spfx-property-controls
added 50 packages, and audited 2693 packages in 53s
171 packages are looking for funding
run `npm fund` for details
86 vulnerabilities (30 moderate, 47 high, 9 critical)
After performing the edits to the default project template as described in the tutorial gulp serve is successful - no errors, but the workbench displays an error (several other errors in dev tools as well)
The componentId
in message:
Manifest not found for component id "0d910c1c-13b9-4e1c-9aa4-b008c5e42d7d" and version "17.0.2". refers to react components.
{
"componentId": "0d910c1c-13b9-4e1c-9aa4-b008c5e42d7d",
"componentName": "react",
"componentVersion": "17.0.1",
"isDirectDependency": false
},
{
"componentId": "0d910c1c-13b9-4e1c-9aa4-b008c5e42d7d",
"componentName": "react",
"componentVersion": "17.0.2",
"isDirectDependency": true
}
Any help is appreciated.
I am attempting to install the following packages in react-native:
npx expo install #react-navigation/native#5.9.8 #react-navigation/stack#5.14.9 react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context #react-native-community/masked-view expo-constants
It has thrown the following error log:
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: nucampsite#1.0.0
npm WARN Found: react-native-safe-area-context#3.4.1
npm WARN node_modules/react-native-safe-area-context
npm WARN react-native-safe-area-context#"4.3.1" from the root project
npm WARN 2 more (react-native-elements, #react-navigation/stack)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-native-safe-area-context#"^3.1.9" from react-native-elements#3.4.2
npm WARN node_modules/react-native-elements
npm WARN react-native-elements#"3.4.2" from the root project
npm WARN deprecated #react-native-community/masked-view#0.1.11: Repository was moved to #react-native-masked-view/masked-view
added 25 packages, removed 1 package, changed 2 packages, and audited 1185 packages in 12s
54 packages are looking for funding
run `npm fund` for details
6 high severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
> npm install --save #react-native-community/masked-view
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-native-elements#3.4.2
npm ERR! Found: react-native-safe-area-context#4.3.1
npm ERR! node_modules/react-native-safe-area-context
npm ERR! peer react-native-safe-area-context#">= 0.6.0" from #react-navigation/stack#5.14.9
npm ERR! node_modules/#react-navigation/stack
npm ERR! #react-navigation/stack#"5.14.9" from the root project
npm ERR! react-native-safe-area-context#"4.3.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-safe-area-context#"^3.1.9" from react-native-elements#3.4.2
npm ERR! node_modules/react-native-elements
npm ERR! react-native-elements#"3.4.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react-native-safe-area-context#3.4.1
npm ERR! node_modules/react-native-safe-area-context
npm ERR! peer react-native-safe-area-context#"^3.1.9" from react-native-elements#3.4.2
npm ERR! node_modules/react-native-elements
npm ERR! react-native-elements#"3.4.2" 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!
npm ERR! For a full report see:
npm ERR! C:\Users\isena\AppData\Local\npm-cache\_logs\2022-12-09T22_33_54_680Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\isena\AppData\Local\npm-cache\_logs\2022-12-09T22_33_54_680Z-debug-0.log
here is my package-json:
{
"name": "nucampsite",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"expo": "^46.0.13",
"expo-status-bar": "^1.4.0",
"react": "^18.0.0",
"react-native": "^0.69.6",
"react-native-elements": "3.4.2",
"#react-navigation/native": "5.9.8",
"#react-navigation/stack": "5.14.9",
"react-native-reanimated": "~2.9.1",
"react-native-gesture-handler": "~2.5.0",
"react-native-screens": "~3.15.0",
"react-native-safe-area-context": "4.3.1",
"expo-constants": "~13.2.4"
},
"devDependencies": {
"#babel/core": "^7.12.9"
},
"private": true
}
I have tried updating react with npm install react#latest
which threw me the following error log:
npm install react#latest
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: nucampsite#1.0.0
npm WARN Found: react#18.0.0
npm WARN node_modules/react
npm WARN peer react#">=16.0" from #react-native-community/masked-view#0.1.11
npm WARN node_modules/#react-native-community/masked-view
npm WARN peer #react-native-community/masked-view#">= 0.1.0" from #react-navigation/stack#5.14.9
npm WARN node_modules/#react-navigation/stack
npm WARN 13 more (#react-navigation/core, #react-navigation/native, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"18.0.0" from react-native#0.69.6
npm WARN node_modules/react-native
npm WARN peer react-native#"*" from #react-native-community/cli#8.0.6
npm WARN node_modules/#react-native-community/cli
npm WARN 11 more (#react-native-community/masked-view, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: nucampsite#1.0.0
npm WARN Found: react#18.0.0
npm WARN node_modules/react
npm WARN peer react#">=16.0" from #react-native-community/masked-view#0.1.11
npm WARN node_modules/#react-native-community/masked-view
npm WARN peer #react-native-community/masked-view#">= 0.1.0" from #react-navigation/stack#5.14.9
npm WARN node_modules/#react-navigation/stack
npm WARN 13 more (#react-navigation/core, #react-navigation/native, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"18.0.0" from react-native#0.69.6
npm WARN node_modules/react-native
npm WARN peer react-native#"*" from #react-native-community/cli#8.0.6
npm WARN node_modules/#react-native-community/cli
npm WARN 11 more (#react-native-community/masked-view, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: nucampsite#1.0.0
npm WARN Found: react#18.0.0
npm WARN node_modules/react
npm WARN peer react#">=16.0" from #react-native-community/masked-view#0.1.11
npm WARN node_modules/#react-native-community/masked-view
npm WARN peer #react-native-community/masked-view#">= 0.1.0" from #react-navigation/stack#5.14.9
npm WARN node_modules/#react-navigation/stack
npm WARN 13 more (#react-navigation/core, #react-navigation/native, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"18.0.0" from react-native#0.69.6
npm WARN node_modules/react-native
npm WARN peer react-native#"*" from #react-native-community/cli#8.0.6
npm WARN node_modules/#react-native-community/cli
npm WARN 11 more (#react-native-community/masked-view, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: nucampsite#1.0.0
npm WARN Found: react#18.0.0
npm WARN node_modules/react
npm WARN peer react#">=16.0" from #react-native-community/masked-view#0.1.11
npm WARN node_modules/#react-native-community/masked-view
npm WARN peer #react-native-community/masked-view#">= 0.1.0" from #react-navigation/stack#5.14.9
npm WARN node_modules/#react-navigation/stack
npm WARN 13 more (#react-navigation/core, #react-navigation/native, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"18.0.0" from react-native#0.69.6
npm WARN node_modules/react-native
npm WARN peer react-native#"*" from #react-native-community/cli#8.0.6
npm WARN node_modules/#react-native-community/cli
npm WARN 11 more (#react-native-community/masked-view, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: nucampsite#1.0.0
npm WARN Found: react#18.0.0
npm WARN node_modules/react
npm WARN peer react#">=16.0" from #react-native-community/masked-view#0.1.11
npm WARN node_modules/#react-native-community/masked-view
npm WARN peer #react-native-community/masked-view#">= 0.1.0" from #react-navigation/stack#5.14.9
npm WARN node_modules/#react-navigation/stack
npm WARN 13 more (#react-navigation/core, #react-navigation/native, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"18.0.0" from react-native#0.69.6
npm WARN node_modules/react-native
npm WARN peer react-native#"*" from #react-native-community/cli#8.0.6
npm WARN node_modules/#react-native-community/cli
npm WARN 11 more (#react-native-community/masked-view, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: nucampsite#1.0.0
npm WARN Found: react#18.0.0
npm WARN node_modules/react
npm WARN peer react#">=16.0" from #react-native-community/masked-view#0.1.11
npm WARN node_modules/#react-native-community/masked-view
npm WARN peer #react-native-community/masked-view#">= 0.1.0" from #react-navigation/stack#5.14.9
npm WARN node_modules/#react-navigation/stack
npm WARN 13 more (#react-navigation/core, #react-navigation/native, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"18.0.0" from react-native#0.69.6
npm WARN node_modules/react-native
npm WARN peer react-native#"*" from #react-native-community/cli#8.0.6
npm WARN node_modules/#react-native-community/cli
npm WARN 11 more (#react-native-community/masked-view, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: nucampsite#1.0.0
npm WARN Found: react#18.0.0
npm WARN node_modules/react
npm WARN peer react#">=16.0" from #react-native-community/masked-view#0.1.11
npm WARN node_modules/#react-native-community/masked-view
npm WARN peer #react-native-community/masked-view#">= 0.1.0" from #react-navigation/stack#5.14.9
npm WARN node_modules/#react-navigation/stack
npm WARN 13 more (#react-navigation/core, #react-navigation/native, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"18.0.0" from react-native#0.69.6
npm WARN node_modules/react-native
npm WARN peer react-native#"*" from #react-native-community/cli#8.0.6
npm WARN node_modules/#react-native-community/cli
npm WARN 11 more (#react-native-community/masked-view, ...)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-native-elements#3.4.2
npm ERR! Found: react-native-safe-area-context#4.3.1
npm ERR! node_modules/react-native-safe-area-context
npm ERR! peer react-native-safe-area-context#">= 0.6.0" from #react-navigation/stack#5.14.9
npm ERR! node_modules/#react-navigation/stack
npm ERR! #react-navigation/stack#"5.14.9" from the root project
npm ERR! react-native-safe-area-context#"4.3.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-safe-area-context#"^3.1.9" from react-native-elements#3.4.2
npm ERR! node_modules/react-native-elements
npm ERR! react-native-elements#"3.4.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react-native-safe-area-context#3.4.1
npm ERR! node_modules/react-native-safe-area-context
npm ERR! peer react-native-safe-area-context#"^3.1.9" from react-native-elements#3.4.2
npm ERR! node_modules/react-native-elements
npm ERR! react-native-elements#"3.4.2" 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.
Thanks for the help!
UPDATE:
The fix I discovered was very simple: instead of forcing the installs through with --force or --legacy-peer-deps, I actually deleted the line
"react-native-safe-area-context": "4.3.1"
from my package.json.
I am in a coding bootcamp and that is the solution we figured out with our instructor.
After running npx create-strapi-app#3 cartdb --quickstart I get a list of errors posted below:
Creating a quickstart project.
Creating files.
- Installing dependencies:
Error while installing dependencies:
npm WARN config production Use `--omit=dev` instead.
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config
npm WARN config Default value does install optional deps unless otherwise omitted.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: cartdb#0.1.0
npm ERR! Found: knex#0.19.5
npm ERR! node_modules/knex
npm ERR! knex#"<0.20.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer knex#"^0.20.0" from strapi-connector-bookshelf#3.1.4
npm ERR! node_modules/strapi-connector-bookshelf
npm ERR! strapi-connector-bookshelf#"3.1.4" 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!
Keep trying!
I've updated npm and node but still encounter this error. I'm still at a lost after reading through the strapi documentation and some other answers on stackoverflow
Im upgrading my project to react v18. Im using multiple packages relying on react v17.
My process for doing the upgrade is to update react to v18 and run npm install.
It gives peer dependency errors. I go and fix one by one.
I run npm install after updating a package version to one that supports react v18.
But something "weird" is happening. First time I run npm install it throws me warning:
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-popper#2.2.5
npm WARN Found: react#18.2.0
npm WARN node_modules/react
npm WARN peer react#"0.14.x || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-popper#1.3.11
npm WARN node_modules/#blueprintjs/core/node_modules/react-popper
npm WARN react-popper#"^1.3.7" from #blueprintjs/core#4.6.0
npm WARN node_modules/#blueprintjs/core
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^16.8.0 || ^17" from react-popper#2.2.5
npm WARN node_modules/#blueprintjs/popover2/node_modules/react-popper
npm WARN react-popper#"^2.2.4" from #blueprintjs/popover2#1.4.2
npm WARN node_modules/#blueprintjs/popover2
Ok, I got warnings but installation is not broken. Now, if I run again npm install without modifying anything it will throw errors:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #storybook/addon-essentials#6.4.22
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR! react#"18.2.0" from the root project
npm ERR! peer react#"^16.8 || 17 || 18" from #blueprintjs/core#4.6.0
npm ERR! node_modules/#blueprintjs/core
npm ERR! #blueprintjs/core#"^4.6.0" from the root project
npm ERR! #blueprintjs/core#"^4.6.0" from #blueprintjs/datetime#4.3.2
npm ERR! node_modules/#blueprintjs/datetime
npm ERR! #blueprintjs/datetime#"^4.3.2" from the root project
npm ERR! 1 more (#blueprintjs/popover2)
npm ERR! 39 more (#blueprintjs/datetime, #blueprintjs/popover2, ...)
npm ERR!
Why it did not throw these errors with the first npm install ?
It looks weird to me that at first it only throws warnings but executing npm install a second time it does actually throw. I could clearly see issues into committing package-lock.json changes where there are only warnings to find later that running npm install throws errors.
Is this execution normal ?
Not sure if this question is for stack overflow or some other channel. Please, let me know if it does not belong to here.
expo init test111
? Choose a template: expo-template-tabs
Using npm to install packages. You can pass --yarn to use Yarn instead.
Extracting project files...
Customizing project...
Unable to initialize git repo. git not in PATH.
Installing dependencies...
npm install
npm WARN deprecated deep-assign#3.0.0: Check out lodash.merge or merge-options instead.
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated core-js#1.2.7: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/naver/hammer.js.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
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\mkame\AppData\Roaming\npm-cache_logs\2020-02-16T22_14_16_693Z-debug.log
npm exited with non-zero code: 1
Set EXPO_DEBUG=true in your env to view the stack trace.
rm -rf node_modules/
npm install
Try removing node modules and reinstall it. This worked for me.