denali-js / core

An opinionated, ORM agnostic framework for building robust JSON APIs in Node
http://denalijs.org
Apache License 2.0
73 stars 14 forks source link

denali publish command fails #400

Closed seawatts closed 7 years ago

seawatts commented 7 years ago
denali publish
cli v0.0.17 [local]  | denali v0.0.37 [local]

✔ Addon built
✔ Tests passed
✖ Publish failed
NestedError: "publish" command failed
    at Function.<anonymous> (./seawatts/denali-jwt/node_modules/denali-cli/lib/command.ts:89:13)
    at Generator.throw (<anonymous>)
    at rejected (./seawatts/denali-jwt/node_modules/tslib/tslib.js:94:69)
    at <anonymous>
Caused By: Error: Command failed: npm publish
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! denali-jwt@1.0.0-beta.6 prepublish: `in-publish && echo "Use 'denali publish' instead." && exit 1 || not-in-publish`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the denali-jwt@1.0.0-beta.6 prepublish script.
davewasmer commented 7 years ago

This looks like an issue in your repo:

npm ERR! denali-jwt@1.0.0-beta.6 prepublish: `in-publish && echo "Use 'denali publish' instead." && exit 1 || not-in-publish`

Looks like you are using a recent denali, but still have the old prepublish hook in your package.json.

tl;dr:

Longer explanation:

The old prepublish script was placed in the addon blueprint to ensure that publishing would always fail. Then the old build script, when it copied the package.json into dist, actually removed that hook. So basically, it was setup to block publishing from the root dir by accident, and instead force you to rely on denali publish, which would build and then publish from dist, as was needed under the old build system, pre main-dir

Now, with main-dir, we don't need to publish from a different folder, so the publish command changed - it no longer does the whole "remove the hook from package.json and publish from dist". It just builds and publishes - that's it.

davewasmer commented 7 years ago

Closing since I'm pretty sure this is an issue in the consuming project. But feel free to leave a comment if you find otherwise and I'll happily reopen

seawatts commented 7 years ago

Sounds great! I'll check when I get home

On Wed, Oct 4, 2017 at 9:03 AM Dave Wasmer notifications@github.com wrote:

Closing since I'm pretty sure this is an issue in the consuming project. But feel free to leave a comment if you find otherwise and I'll happily reopen

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/denali-js/denali/issues/400#issuecomment-334205536, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDIwnS__R2oR-a7-X2Q1ogeMsDnrdCgks5so6xagaJpZM4PtDzf .