Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed at the expect@1.12.1 postinstall script 'node npm-scripts/postinstall.js' #39

Closed
pierol opened this issue Oct 11, 2015 · 31 comments
Labels

Comments

@pierol
Copy link

pierol commented Oct 11, 2015

I'm trying to npm install a project that have your package as dependecy under Windows 7 SP1 x64 ITA but something goes wrong

verbose stack Error: expect@1.12.1 postinstall: `node npm-scripts/postinstall.js`
65930 verbose stack Exit status 1
65930 verbose stack     at EventEmitter.<anonymous> (C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:222:16)
65930 verbose stack     at emitTwo (events.js:87:13)
65930 verbose stack     at EventEmitter.emit (events.js:172:7)
65930 verbose stack     at ChildProcess.<anonymous> (C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:24:14)
65930 verbose stack     at emitTwo (events.js:87:13)
65930 verbose stack     at ChildProcess.emit (events.js:172:7)
65930 verbose stack     at maybeClose (internal/child_process.js:818:16)
65930 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
65931 verbose pkgid expect@1.12.1
65932 verbose cwd W:\react-redux-webpack-boilerplate-master
65933 error Windows_NT 6.1.7601
65934 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Piero\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
65935 error node v4.1.2
65936 error npm  v3.3.7
65937 error code ELIFECYCLE
65938 error expect@1.12.1 postinstall: `node npm-scripts/postinstall.js`
65938 error Exit status 1
65939 error Failed at the expect@1.12.1 postinstall script 'node npm-scripts/postinstall.js'.
65939 error This is most likely a problem with the expect package,
65939 error not with npm itself.
65939 error Tell the author that this fails on your system:
65939 error     node npm-scripts/postinstall.js
65939 error You can get their info via:
65939 error     npm owner ls expect
65939 error There is likely additional logging output above.
65940 verbose exit [ 1, true ]



@mjackson
Copy link
Owner

Thanks for the bug report, @pierol. Can you please paste the result of running node npm-scripts/postinstall.js from inside the repo root?

@pierol
Copy link
Author

pierol commented Oct 12, 2015

Thank for your attention @mjackson from inside the repo root the error of

node npm-script/postinstall.js 

is


module.js:338
    throw err;
    ^

Error: Cannot find module 'W:\react-redux-webpack-boilerplate-master\npm-scripts\postinstall.js'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:118:18)
    at node.js:952:3

@mjackson
Copy link
Owner

I meant from inside the expect repo root. :)

Or maybe the problem is that our node npm-scripts/postinstall.js command is relative...

@pierol
Copy link
Author

pierol commented Oct 12, 2015

Sorry @mjackson i'm not an expert of npm packages but the error came out when i did a npm install of a react boilerplate project that i downloaded from github. I don't have a npm-scripts folder in the root repo of my project. The package i think should install locally as a result of the npm install comand.

@mjackson
Copy link
Owner

No problem, @pierol. Please try npm install expect and tell me if you get an error. If you don't, then we know that the error only occurs when you install a package that depends on expect. If you do, then we have a different problem.

@pierol
Copy link
Author

pierol commented Oct 12, 2015

Yes doing a npm install of the single package went good, so as you suggest the problem is not your package.

@breedx2
Copy link

breedx2 commented Oct 12, 2015

We have the same problem here. doing npm install fails with the same error as above, but if I rm -rf node_modules/expect and then npm install a second time it works.

Definitely a problem related to installing expect at the same time as other modules.

@mjackson
Copy link
Owner

I bet we need to change node npm-scripts/postinstall.js to node ./npm-scripts/postinstall.js so that the path is relative. Either that or just inline the whole postinstall script in package.json.

@mjackson mjackson added the bug label Oct 12, 2015
@rstacruz
Copy link
Collaborator

why not just:

"postinstall": "npm run build"

@rstacruz
Copy link
Collaborator

@mjackson
Copy link
Owner

@rstacruz I think if we do that then people who don't get our devDependencies (i.e. people who install using npm install --production) won't be able to run that step because they won't have babel.

Regarding win-spawn, does execSync not work on Windows?

mjackson added a commit that referenced this issue Oct 13, 2015
@mjackson
Copy link
Owner

@pierol @breedx2 I believe I fixed this issue in 79aeeb1 which is released in 1.12.2. Can you please try with that version and verify it's ok? If so, please close. Thanks!

@mjackson
Copy link
Owner

Any updates @pierol? I'd like to close this if we can. Thanks.

@pierol
Copy link
Author

pierol commented Oct 15, 2015

Hi @mjackson sorry for the late, i download a new fresh copy of the package react-redux-webpack-boilerplate-master and i edit the package.json and update the expect package version to 1.12.2 but the error happen again here the erro log:

silly postinstall expect@1.12.2 W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.staging\expect-00703883aafc9c65cf954ecbb867bf53
65204 info lifecycle expect@1.12.2~postinstall: expect@1.12.2
65205 verbose lifecycle expect@1.12.2~postinstall: unsafe-perm in lifecycle true
65206 verbose lifecycle expect@1.12.2~postinstall: PATH: C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\object-inspect\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\object-component\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\eslint-loader\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\object-assign\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\is-integer\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\is-finite\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\number-is-nan\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\num2fraction\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\fs-access\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\null-check\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\normalize-url\node_modules\object-assign\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\normalize-url\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\node-notifier\node_modules\minimist\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\node-notifier\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\node-libs-browser\node_modules\process\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\node-libs-browser\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\node-emoji\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\accepts\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\negotiator\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mute-stream\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\debug\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\ms\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\supports-color\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\debug\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\ms\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\mkdirp\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\minimist\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\graceful-fs\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\escape-string-regexp\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\commander\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mocha\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mkdirp\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mkdirp\node_modules\minimist\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mkdirp\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\minimist\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\minimatch\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\min-document\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\express\node_modules\accepts\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\express\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mime-types\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\compressible\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mime-db\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\mime\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\micromatch\node_modules\kind-of\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\micromatch\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\micromatch\node_modules\is-glob\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\micromatch\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\methods\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\merge-descriptors\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\memory-fs\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\media-typer\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\marked\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lru-cache\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lower-case-first\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\is-lower-case\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lower-case\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\invariant\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\loose-envify\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\longest\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\log4js\node_modules\async\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\log4js\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash.merge\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash.toplainobject\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash.assign\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash._createassigner\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash.omit\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash.pick\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash.restparam\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash._pickbycallback\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\flux-standard-action\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash.isplainobject\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash.keysin\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash.clonedeep\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash._baseclone\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash._baseassign\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash.keys\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash.istypedarray\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash.flatten\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash._baseflatten\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash.isarray\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash.isarguments\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash._pickbyarray\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash._isiterateecall\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin;C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\lodash._basedifference\node_modules\.bin;W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.bin
65207 verbose lifecycle expect@1.12.2~postinstall: CWD: W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\expect
65208 silly lifecycle expect@1.12.2~postinstall: Args: [ '/d /s /c', 'node ./npm-scripts/postinstall.js' ]
65209 silly lifecycle expect@1.12.2~postinstall: Returned: code: 1  signal: null
65210 info lifecycle expect@1.12.2~postinstall: Failed to exec postinstall script
65211 verbose unlock done using C:\Users\Piero\AppData\Roaming\npm-cache\_locks\staging-92b4cab165a3b7c4.lock for W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master\node_modules\.staging
65212 silly rollbackFailedOptional Starting
65213 silly rollbackFailedOptional Finishing
65214 silly runTopLevelLifecycles Starting
65215 silly runTopLevelLifecycles Finishing
65216 silly install printInstalled
65217 warn EPACKAGEJSON react-redux-webpack-boilerplate@0.0.1 No repository field.
65218 verbose stack Error: expect@1.12.2 postinstall: `node ./npm-scripts/postinstall.js`
65218 verbose stack Exit status 1
65218 verbose stack     at EventEmitter.<anonymous> (C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:222:16)
65218 verbose stack     at emitTwo (events.js:87:13)
65218 verbose stack     at EventEmitter.emit (events.js:172:7)
65218 verbose stack     at ChildProcess.<anonymous> (C:\Users\Piero\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:24:14)
65218 verbose stack     at emitTwo (events.js:87:13)
65218 verbose stack     at ChildProcess.emit (events.js:172:7)
65218 verbose stack     at maybeClose (internal/child_process.js:818:16)
65218 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
65219 verbose pkgid expect@1.12.2
65220 verbose cwd W:\react-redux-webpack-boilerplate-new\react-redux-webpack-boilerplate-master
65221 error Windows_NT 6.1.7601
65222 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Piero\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
65223 error node v4.1.2
65224 error npm  v3.3.7
65225 error code ELIFECYCLE
65226 error expect@1.12.2 postinstall: `node ./npm-scripts/postinstall.js`
65226 error Exit status 1
65227 error Failed at the expect@1.12.2 postinstall script 'node ./npm-scripts/postinstall.js'.
65227 error This is most likely a problem with the expect package,
65227 error not with npm itself.
65227 error Tell the author that this fails on your system:
65227 error     node ./npm-scripts/postinstall.js
65227 error You can get their info via:
65227 error     npm owner ls expect
65227 error There is likely additional logging output above.
65228 verbose exit [ 1, true ]

@mjackson
Copy link
Owner

Thanks for reporting back @pierol. The unsafe-perm in lifecycle true message makes it seem like this is a permissions error on your system. Our postinstall script looks for a lib directory and tries to create one if it doesn't find it. If you don't have read+write permissions on the directory where expect is being installed, this may be the cause of the problem.

@pierol
Copy link
Author

pierol commented Oct 15, 2015

@mjackson i'm sure i have the rights for that, i'm under windows file system and i have administration rights (on windows system we don't have the sudo command a npm install is enough if you are an administration user of the machine). The installation process create folders under the node_modules of the root repo and for other packages the creation process doesn't stop with an access right error only for the package expect@1.12.2. Look at this snapshot it shows you all the folder starting with 'e' under the node_modules folder of the repo, you can see all the packages needed but you can't find yours:
1

@mjackson
Copy link
Owner

I can't see anything else in npm's error message that give me any other
clues as to what might be wrong...

Just to be clear, when you do an npm install expect everything works,
right? This only happens when you install another package that depends on
expect?

On Thu, Oct 15, 2015 at 10:26 AM Piero Longhetto notifications@github.com
wrote:

@mjackson https://github.com/mjackson i'm sure i have the rights for
that, i'm under windows file system and i have administration rights (on
windows system we don't have the sudo command a npm install is enough if
you are an administration user of the machine). The installation process
create folders under the node_modules of the root repo and for other
packages the creation process doesn't stop with an access right error only
for the package expect@1.12.2. Look at this snapshot it shows you all the
folder starting with 'e' under the node_modules folder of the repo, you can
see all the packages needed but you can't find yours:
[image: 1]
https://cloud.githubusercontent.com/assets/433875/10521795/f2c2dc9c-7371-11e5-9e9e-ad066717f6a9.png


Reply to this email directly or view it on GitHub
#39 (comment).

@pierol
Copy link
Author

pierol commented Oct 15, 2015

Yes right: it happens only when i do a npm install not when i install only your package. I don't know if you can simulate in some way my process. Could it be the path: different slash on windows platform ?

@pierol
Copy link
Author

pierol commented Oct 15, 2015

Just for information if i do the same operation on a Mac no error comes out. So the problem is specific to windows platform.

@mjackson
Copy link
Owner

@pierol The comment from @breedx2 suggests that this problem only happens when you install expect along-side other packages. Maybe you could create a test package and try installing some other package and expect in the same go. Something like:

npm install something-else expect

And see what happens? Since I don't have access to a Windows machine, I can't test on my end.

@pierol
Copy link
Author

pierol commented Oct 15, 2015

I create this package.json file:

{
  "name": "test-package",
  "version": "0.0.1",
  "description": "test for expect",
  "main": "",
  "scripts": {
  },
  "author": "Kevin Whitaker",
  "license": "MIT",
  "devDependencies": {
    "babel": "^5.8.23",
    "expect": "^1.12.2"
  }
}

put it in a folder called test-package and run npm install and no errors appear and the package expect is inside the node_modules of the root test-package. So it's real a strange bug.

@mjackson
Copy link
Owner

Which original package are you trying to install?

@pierol
Copy link
Author

pierol commented Oct 15, 2015

@luisrudge
Copy link

I just cloned the repo and npm install worked great.

λ node -v
v4.1.2
λ npm -v
3.3.6

@babeard
Copy link

babeard commented Oct 16, 2015

Same here.
Cloned repo and it worked:

node 4.0.0
npm 2.4.1
Windows 8.1

@luisrudge
Copy link

I'm on windows 10 BTW

@mindpivot
Copy link

Cloned repo, npm install-ed, node-gyp threw a ton of errors but in the end it actually seemed to build fine.

Windows 10
Node 4.2.1

@luisrudge
Copy link

about node-gyp: nodejs/node-gyp#629

@mindpivot
Copy link

@luisrudge that just ruined my day

@mindpivot
Copy link

Updated to latest version of npm using "npm i -g npm@latest", re-ran the react-redux-webpack-boilerplate's "npm install" and it worked fine.

Also installed the C++ tools for Visual Studio but I'm skeptical that had any impact on the outcome.

@mjackson
Copy link
Owner

@luisrudge @mindpivot Thank you for testing this out!

@pierol I don't know what to tell you. It looks like other Windows users are ok. I'm going to close for now. If you find any new evidence, please comment and we can re-open!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants