How to use npm modules in browser? is possible to use them even in local (PC)?

browserify is the correct direction, but it took me quite some effort to work out the actual solution. I have summarized a short blog for this, and here are some quick recap: Say, you want to use emailjs-mime-parser and buffer npm libraries in your HTML. install everything required npm install -g browserify npm install emailjs-mime-parser … Read more

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

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

tech