Skip to content

package.json postinstall not working on Windows msysgit #28

@kayhadrin

Description

@kayhadrin

Note that the postinstall command does not work on msysgit on Windows.

In package.json:

"scripts": {
    "postinstall": "./node_modules/.bin/bower install"
}

I get this error during the npm install.

> yom-angularjs-testing-article@0.0.0 postinstall c:\workspace\AngularJS-Testing-Article
> ./node_modules/.bin/bower install

'.' is not recognized as an internal or external command,
operable program or batch file.

npm ERR! yom-angularjs-testing-article@0.0.0 postinstall: `./node_modules/.bin/bower install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yom-angularjs-testing-article@0.0.0 postinstall script.
npm ERR! This is most likely a problem with the yom-angularjs-testing-article package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./node_modules/.bin/bower install
npm ERR! You can get their info via:
npm ERR!     npm owner ls yom-angularjs-testing-article
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\dev\\apps\\nodejs\\node.exe" "c:\\dev\\apps\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "install"
npm ERR! cwd c:\itrac\workspace\AngularJS-Testing-Article
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     c:\workspace\AngularJS-Testing-Article\npm-debug.log
npm ERR! not ok code 0

This is because on Windows, the postinstall command is executed as a "DOS" command instead.

Perhaps it'd be good to add a mention of this in the readme file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions