Equipment problem

NPM audit fix or YARN Add Audit fixCopy the code

Permission problems

Let me reinstall all kinds of packages pit all night, and finally found that I jumped the wrong pit, TMD is the problem of file permissions

(node:1437) UnhandledPromiseRejectionWarning: Error: spawnSync /Users/dengli/Desktop/new/Ddhv2/node_modules/react-native/local-cli/setup_env.sh EACCES

at Object.spawnSync (internal/child_process.js:1019:20) at spawnSync (child_process.js:624:24) at Object.execFileSync (child_process.js:652:15) at Object.run (/Users/dengli/Desktop/new/Ddhv2/node_modules/react-native/local-cli/cliEntry.js:146:16) (node:1437) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:1437) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The last thing that saved me was one fucking word

chmod -R 777 node_modules
Copy the code

Totally taken…

And if it still doesn’t work, reinstall it

yarn add audit
Copy the code