Fixing Core-JS/Package.json error in Vue-SFC-ROLLUP

·

1 min read

It feels good to pickup a tutorial article, follow the step-by-step instructions and have everything working. That wasn't the case recently for me when I tried to publish a Vue component to the npm registry. In case you are interested in publishing a component, here is the article I was following Create and Publish A Vue Component.

After correcting the mistake of not running npm install after scaffolding a project with vue-sfc-rollup, I tried to startup the project with the famous npm run serve command of the Vue world, but I kept getting a "Babel couldn't find corejs/package.json file." It turns out this is a bug that has sort of lived on since there was an easy-enough fix for it. Should you also run into an error like this, all you have to do is to separately install the core-js library and all will be well.