Unable to parse repository name/owner from package.json


#1

Hello, i made a snippet package for atom and when i’m trying to do apm publish minor it throws me this error:

Unable to parse repository name/owner from package.json repository failed

I really dont know what i did wrong. I have the package on github (https://github.com/FlevasGR/codeigniter-nucleus)

and everything on the package.json is set correctly.

{
  "name": "codeigniter-nucleus",
  "main": "./lib/codeigniter-nucleus",
  "version": "0.0.0",
  "owner": "FlevasGR",
  "description": "Codeigniter snippets for quick typing",
  "repository": "https://github.com/FlevasGR/codeigniter-nucleus/",
  "readme": "blablabla",
  "readmeFilename": "README.md",
  "bugs": {
    "url": "https://github.com/FlevasGR/codeigniter-nucleus/issues"
  },
  "homepage": "https://github.com/FlevasGR/codeigniter-nucleus/",
  "license": "MIT",
  "engines": {
    "atom": ">=1.0.0 <2.0.0"
  }
}

Can anyone help me?


#2

Here’s the package.json from one of my packages:

{
  "name": "tabs-to-spaces",
  "author": "Lee Dohm <lee@lee-dohm.com>",
  "main": "./lib/index",
  "version": "0.11.0",
  "description": "Provides the ability to convert between leading tabs and spaces in a document",
  "keywords": [
    "convert",
    "indentation",
    "spaces",
    "tabs"
  ],
  "repository": "https://github.com/lee-dohm/tabs-to-spaces",
  "license": "MIT",
  "engines": {
    "atom": ">=0.201.0 <2.0.0"
  },
  "devDependencies": {
    "temp": "~0.6.0"
  }
}

Some things I’ve noticed:

  1. You have a few unnecessary fields in there. I would remove these just in case.
    • readme
    • readmeFilename
    • owner
    • bugs
  2. You have a trailing slash on your URLs. Try removing them.

#3

bugs is a valid field, and I think you encounter an error because you didn’t specify an author field. Try replacing the owner field with something like this:

"author": "FlevasGR <your@email.here>"

#4

While apm is based on npm, it does not honor the entire package.json specification you cite.