My first NPM package
Woke up this morning to a world that’s mostly unchanged despite publishing my first NPM package yesterday. The library is called react-leaflet-canvas-overlay
and it’s a React component for React Leaflet. The library pins a canvas
element on a map and it remains above the same location as you pan and zoom the map. I use a canvas
on shademap.app to display the earth’s shadows in real time. I hope others find a use for it in their projects.
Moving on…
The main purpose of this blogpost is to share two cryptic errors that I ran into when running npm publish
for the first time.
Make sure you are logged in
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/react-leaflet-canvas-overlay - Not found
npm ERR! 404
npm ERR! 404 'react-leaflet-canvas-overlay@0.0.1' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name
...