Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

current package.json is broken, producing errors when e.g. installing through github link #94

Open
schumannd opened this issue Apr 26, 2018 · 0 comments

Comments

@schumannd
Copy link

schumannd commented Apr 26, 2018

error produced by www.package-json-validator.com :

{
  "valid": false,
  "errors": [
    "Value for field version, next does not match format: /^[0-9]+\\.[0-9]+[0-9+a-zA-Z\\.\\-]+$/"
  ],
  "warnings": [
    "Missing recommended field: bugs",
    "Missing recommended field: licenses",
    "Missing recommended field: contributors"
  ],
  "recommendations": [
    "Missing optional field: homepage",
    "Missing optional field: engines"
  ]
}

after fixing this error I still ran into other issues when trying to run
npm install https://github.com/CharlesMangwa/react-native-simple-markdown --save
like:

> [email protected] prepack /Users/<myuser>/.npm/_cacache/tmp/git-clone-78788e2d
> npm run prepack:clean && npm run prepack:babel && npm run prepack:flow


> [email protected] prepack:clean /Users/<myuser>/.npm/_cacache/tmp/git-clone-78788e2d
> rimraf lib

sh: rimraf: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] prepack:clean: `rimraf lib`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] prepack:clean script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! code ENOPACKAGEJSON
npm ERR! package.json Non-registry package missing package.json: git+https://github.com/schumannd/react-native-simple-markdown.git#next.
npm ERR! package.json npm can't find a package.json file in your current directory.

I guess it is expected for rimraf to be installed globally? Or maybe that second error is misconfiguration on my side...

Anyway I found the prepack commands to be not necessary, so removing them and directly referencing src/ in package.json did the trick. (see https://github.com/schumannd/react-native-simple-markdown/tree/forkable)

It would be great to enable easy forking and patching of this package, to have it work by installing it via link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant