Do I need both package-lock.json and package.json?

Do you need both package-lock.json and package.json? No. Do you need the package.json? Yes. Can you have a project with only the package-lock.json? No. The package.json is used for more than dependencies – like defining project properties, description, author & license information, scripts, etc. The package-lock.json is solely used to lock dependencies to a specific … Read more

Installing create-react-app gives npm ERR! shasum check failed and npm ERR! Unexpected end of JSON input while parsing near ‘…mojOzGIEI2rg0m24Yb5Oq’

the error npm ERR! shasum check failed and npm ERR! Unexpected end of JSON input while parsing near’….’ ,   will be solved by switching npm reigistry from the list of given npm registry. List of Npm registry: https://registry.npmjs.org/ (Dfault One) http://r.cnpmjs.org/ https://registry.npm.taobao.org/ https://registry.nodejitsu.com/ http://registry.mirror.cqupt.edu.cn https://skimdb.npmjs.com/registry https://npm.open-registry.dev/ (https://open-registry.dev) To switch just type npm config set … Read more

How to solve npm install throwing fsevents warning on non-MAC OS?

fsevents is dealt differently in mac and other linux system. Linux system ignores fsevents whereas mac install it. As the above error message states that fsevents is optional and it is skipped in installation process. You can run npm install –no-optional command in linux system to avoid above warning. Further information https://github.com/npm/npm/issues/14185 https://github.com/npm/npm/issues/5095

npm install and build of forked github repo

Try npm install <ghusername>/<repoName>, where <ghUsername> is your GitHub username (without the @) and <repoName> is the name of the repository. That should correctly install it. You will most likely want to use the –save or –save-dev flag with the install command to save dependency in your package.json. If that isn’t working correctly, check the … Read more

How do I fix the npm UNMET PEER DEPENDENCY warning?

npm no longer installs peer dependencies so you need to install them manually, just do an npm install on the needed deps, and then try to install the main one again. Reply to comment: it’s right in that message, it says which deps you’re missing UNMET PEER DEPENDENCY angular-animate@^1.5.0 +– UNMET PEER DEPENDENCY angular-aria@^1.5.0 +– … Read more