Warnings in React

Is it normal to get the below warnings in my react app? If not, how can I fix them? Warnings below

WARNING in ./node_modules/@metamask/detect-provider/dist/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/MY-PATH/node_modules/@metamask/detect-provider/src/index.ts' file: Error: ENOENT: no such file or directory, open '/MY-PATH/node_modules/@metamask/detect-provider/src/index.ts'
 @ ./node_modules/moralis/lib/browser/MoralisWeb3.js 97:45-81
 @ ./node_modules/moralis/lib/browser/Parse.js 45:42-66
 @ ./node_modules/moralis/index.js 1:0-50
 @ ./node_modules/react-moralis/lib/index.esm.js 3:0-36 5348:11-24
 @ ./src/index.js 6:0-48 16:38-53

WARNING in ./node_modules/moralis/lib/browser/Web3Connector/MagicWeb3Connector.js 175:38-58
Module not found: Error: Can't resolve 'magic-sdk' in '/MY-PATH/node_modules/moralis/lib/browser/Web3Connector'
 @ ./node_modules/moralis/lib/browser/MoralisWeb3.js 99:49-94
 @ ./node_modules/moralis/lib/browser/Parse.js 45:42-66
 @ ./node_modules/moralis/index.js 1:0-50
 @ ./node_modules/react-moralis/lib/index.esm.js 3:0-36 5348:11-24
 @ ./src/index.js 6:0-48 16:38-53

WARNING in ./node_modules/moralis/lib/browser/Web3Connector/WalletConnectWeb3Connector.js 153:54-93
Module not found: Error: Can't resolve '@walletconnect/web3-provider' in '/MY-PATH/node_modules/moralis/lib/browser/Web3Connector'
 @ ./node_modules/moralis/lib/browser/MoralisWeb3.js 87:57-110
 @ ./node_modules/moralis/lib/browser/Parse.js 45:42-66
 @ ./node_modules/moralis/index.js 1:0-50
 @ ./node_modules/react-moralis/lib/index.esm.js 3:0-36 5348:11-24
 @ ./src/index.js 6:0-48 16:38-53

WARNING in ./node_modules/moralis/lib/browser/Web3Connector/Web3AuthConnector.js 132:40-69
Module not found: Error: Can't resolve '@web3auth/web3auth' in '/MY-PATH/node_modules/moralis/lib/browser/Web3Connector'
 @ ./node_modules/moralis/lib/browser/MoralisWeb3.js 101:25-69
 @ ./node_modules/moralis/lib/browser/Parse.js 45:42-66
 @ ./node_modules/moralis/index.js 1:0-50
 @ ./node_modules/react-moralis/lib/index.esm.js 3:0-36 5348:11-24
 @ ./src/index.js 6:0-48 16:38-53
2 Likes

I wouldn’t worry about it until something breaks, doesn’t work or you get into production.

usually i wouldnt worry about wraning but these ones seem quite serious if you are planning on implementing the wallets about that you app cant resolve. how did you come to this did you fork eth boiler plate or have you npm or yarn installed those packages from your warning messages at all?. you could try install them individually

I cloned the boilerplate, but I am greeted with too much of the warnings even after NPM install. So I decided to just start a basic npx create-react-app and then manually npm i all the moralis stuff from the tutorials.

Im thinking of installing the dependencies, but it might not be useful as the packages are the ones referencing these directly and not my app (do correct me if im wrong)

That’s definitely fine just installing the packages as you need them. Having a bunch of warnings is pretty normal to start with.

is it ok to manually install the packages myself even though its the library’s code referencing them? shouldn’t those be in the packaged along with the moralis library already?

They will already be referenced in the package.json of the template so they install when you run npm install yes.

If you run an npm install package without a version this will install the latest version of that package that is available so you can try it if you want to see if that get rid of the warning. But warnings even for unchanged templates are normal.

I see. Thank you for the explanation. Will try this out. Appreciate you guys!