Missing files when try to install a forked package - react-native

I created a fork from react-native-calendar. But it doesn't add all files when I try to install it with npm. for example in the calendar folder, there is not any JS and TS file. You can check my forked version here.
Forked Package:
Original Package:
✅ Solved:
The package needs to preinstall

Related

What package versions are installed when running vite build?

This is probably a pretty basic question, but I can't find an answer:
If I have a project with a dependency in package.json listed as foobar: ^3.2.1, what version of that dependency will be installed when I run vite build, assuming that the latest available version of the package is 3.4.5?
First thing first, vite build won't change anything to your dependencies. I won't install ones nor update them. It will only build your project (i.e. compile / transpile / minify / bundle etc.) using your source code and the code it imports (likely within the node_modules).
It will build locally, so using your local dependencies in the node_modules folder.
To check the current package version you have installed, you can run:
npm list --depth=0 | grep foobar
(The grep part is optional)
You can also open your package-lock.json or yarn.lock file and search for your package to know to what version your package has been fixed to.
To understand about the semantic version with npm, read this documentation: https://docs.npmjs.com/about-semantic-versioning

NPM install github package but skip gitignore

For example bootstrap package .gitignore has
# Ignore docs files
/_site/
How can i install bootstrap package included all file that inside /_site/ ?
I have no experience with git, is there a simple way to do the above with npm?

Transpile with babel after npm install

I installed this package: https://github.com/feathersjs/feathers-authentication-local (question not related specifically to this package). This package's source code is in ./src, and npm run compile puts the babel-transpiled code into ./lib, which is the main entry point.
My question is, after I do npm install feathers-authentication-local, how does npm know that it needs to run npm run compile? I thought of putting a postinstall script in package.json, this package doesn't have that.
Regarding what is uploaded to npm when publishing, there are two fields in package.json, files and directories, which are used to specify what should be uploaded.
Take a look as well to "main" property, it points to the files that will be used when importing a module in your aplication so:
import foo from 'foo'
Will look into node_modules/foo/$(main) which in this case points to lib/
The package actually doesn't compile after install on client's machines, but it's probably compiled on the mantainer's machine and then published on NPM.
Compiling process is fired by the prepublish script in package.json.

Install mapbox-gl package via jspm failing

I am trying to add the mapbox gl package to my Aurealia Typescript skeleton using jspm. I am using the following command.
jspm install npm:mapbox-gl
This is what I am getting.
Looking up npm:mapbox-gl
Updating registry cache...
Downloading npm:mapbox-gl#0.19.1
warn Error on processPackageConfig
Package.json dependency mapbox-gl-shaders set to github:mapbox/mapbox-gl-shaders#e4737bb136d718f9c5fe8d943380f05db6249b57, which is not a valid dependency format for npm.
It's advisable to publish jspm-style packages to GitHub or another registry so conventions are clear.
warn Error processing package config for npm:mapbox-gl.
err Error processing package config for npm:mapbox-gl.
warn Installation changes not saved.
I am using jspm 0.16.36.
When I try to install the package via npm install mapbox-gl it works normally. Any suggestions?
Considering you are using jspm, you might also want to try and reference it through the GitHub repo rather than through npm:
$ jspm install github:mapbox/mapbox-gl-js
It works for me with jspm v16.x and v0.21.0 of MapboxGL.

Add README.md to published npm package

I already published a package to NPM, but forgot the README. I updated the package, tried npm publish ./ again, but it says I can't publish on top of a published package.
So, how do I send a README to a published package?
You should increment the version. Like 0.0.0 to 0.0.1.
Just open package.json in your text editor, find "version":"0.0.0" and type in the new value.
After incrementing the version. Like 0.0.0 to 0.0.1 in your package.json file
Create a README.md in the project root directory of your package. after writing up your read me. you can now publish your package by running the npm publish. that should work and should show up your readme on the npm site.