Use `npm.prefix` here, not `.`.  You don't know that it's being called in the package root.  Also: slashes.

```javascript
jsonFile = path.resolve(npm.prefix, "package.json")
```