Skip to content

[v1.0.0] npm run cleanup - sh: 1: ./superscript/lib/bin/cleanup.js: Permission denied #305

@hailiang-wang

Description

@hailiang-wang

In package.json, add cleanup script.

    "cleanup": "DEBUG=* ./superscript/lib/bin/cleanup.js --mongo PhillyLogicDB",

Expected Behavior

All data in mongodb is dropped.

Current Behavior

Get an error.

$ npm run cleanup

> philly-logic@1.0.0 cleanup /root/git/chatbot-mvp/philly-logic
> DEBUG=* ./superscript/lib/bin/cleanup.js --mongo PhillyLogicDB

sh: 1: ./superscript/lib/bin/cleanup.js: Permission denied

npm ERR! Linux 3.13.0-86-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "cleanup"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! philly-logic@1.0.0 cleanup: `DEBUG=* ./superscript/lib/bin/cleanup.js --mongo PhillyLogicDB`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the philly-logic@1.0.0 cleanup script 'DEBUG=* ./superscript/lib/bin/cleanup.js --mongo PhillyLogicDB'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the philly-logic package,

Possible Solution

Add exec permissions.

Steps to Reproduce (for bugs)

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. PHP 5.4 on nginx 1.9.1):
  • Server type and version:
  • Operating System and version:
  • Link to your project:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions