Closed LeslieOA closed 5 years ago
Discussion from Slack:
I think this may be happening merely because I've specified in my instructions to install my git repo, but my git repo isn't in the form of an npm package. It's still in a logical layout, however – it mirrors that of NativeScript-Angular.
I shall update the instructions to recommend taking a clone of the project and running
npm link
relative to that clone (at least until I publish a release version).[A root-level
package.json
] has nosemantic meaningpurpose other than to let usersnpm install
from the GitHub repo, however.In retrospect, I shouldn't have given that as an instruction, because my GitHub repo is not set up as a node module, and if users do follow those instructions, they will have to pull my
sample
app and maybe all of its dependencies in (even though they just want thereact-nativescript
library).The existing
package.json
inreact-nativescript/react-nativescript/package.json
is what users will receive when they install any releases vianpm
. It specifies which files to distribute when publishing an npm module, as well as the dependencies of the framework, and lives alongside anode_modules
folder that thesrc
directory refers to. So it's semantic and purposeful.An extra repo-root-level
package.json
would also likely lead to dependency issues. The dependencies ofreact-nativescript
are specified and imported from our inner-levelpackage.json
. If a user installs via GitHub, I think it'll see the root-levelpackage.json
and get very confused about why no dependencies are listed.
Closed by 512dbf9. Thanks for the Issue filing! Hoping these new instructions work better.
Hey @shirakaba.
Had a little downtime so started to look into
react-nativescript
and noticed that for those who may usenpm
overyarn
, they'd be hit with the following error:Adding a
package.json
seems to solve this (e.g. here https://github.com/LeslieOA/react-nativescript).Hope this helps/let me know if a PR would be more helpful.
Peace.