last week I published a really simple package on NPM. It only comprises three files:
package.json README.md tofjs-full.node.js
The tofjs-full.node.js
contains the whole code, the package is called tofjs-full
and it should be available after a require('tofjs-full')
call.
The package.json
file has the following content:
{ "name": "tofjs-full",
"version": "1.0.0",
"description": "`tofjs-full` is the current state of the [TofJs](http://tofjs.org) program, bundled in a single NPM package.",
"author": "bucephalus <bucephalus.org@gmail.com> (http://bucephalus.org)",
"license": "ISC",
"homepage": "http://tofjs.org/program/tofjs-full",
"bugs": { "url": "https://groups.google.com/forum/#!forum/tofjs" },
"repository": "http://tofjs.org/package/tofjs-full/1.0.0/",
"main": "tofjs-full.node.js",
"dependencies": {
"fs-extra": "^0.30.0",
"markdown": "^0.5.0",
"sha1": "^1.1.1",
"sha1-file": "^1.0.0",
"coffee-script": "^1.10.0",
"escodegen": "^1.8.0",
"esprima": "^2.7.2"
},
"files": [ "tofjs-full.node.js" ] }
I published the package by going to the according directory and call
npm publish
I don't remember the precise reaction. But the package tofjs-full
is now officially available from the NPM repository (https://www.npmjs.com/package/tofjs-full).
However, when I go to another machine and try a
sudo npm install tofjs-full
the answer is a display with the tree of all dependencies and then some warnings (each line beginning with npm WARN
):
ENOENT: no such file or directory, open `'/path/to/dir/package.json'
No description field.
No README data.
No license field.
Can you tell me what's going wrong, please? Thank you, Bucephalus