Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6208

Issue with publishing my first NPM Package

$
0
0

I've created my first NPM package which is a React Native component library. I have have published it, but I can't seem to figure out what I'm doing wrong to get it working in my project.

package.json

I have the main, types (For Typescript), and files I included and used npm publish to save changes to NPM. Here's what my package.json has

"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": ["dist/", "package.json", "License.txt" ]

However, when I use npm i react-native-ultimate-modal-picker to install the package in my project, It's not working with my project and my package folder located in node_modules is outlined in red such as the following. What am I doing wrong??

enter image description here


Viewing all articles
Browse latest Browse all 6208

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>