FormidableLabs / formidable-react-component-boilerplate

MIT License
22 stars 2 forks source link

Bug: New postinstall build workflow causes errors with npm v2 #49

Closed exogen closed 9 years ago

exogen commented 9 years ago

With a fresh Node v4 or v0.12 installation from nvm, but with npm@2 installed instead of npm@3, an npm install of a module that depends on a module using our new postinstall workflow will fail:

$ git clone git@github.com:FormidableLabs/victory-bar.git
$ cd victory-bar
$ npm install

...fails with this output:

<snip irrelevant peerDependencies complaints>

> victory-animation@0.0.6 postinstall /Users/brianbeck/Projects/Formidable/victory-bar/node_modules/victory-animation
> npm run build-lib

|
> victory-animation@0.0.6 build-lib /Users/brianbeck/Projects/Formidable/victory-bar/node_modules/victory-animation
> npm run clean-lib && babel --stage 0 src -d lib

\
> victory-animation@0.0.6 clean-lib /Users/brianbeck/Projects/Formidable/victory-bar/node_modules/victory-animation
> rimraf lib

sh: rimraf: command not found

<snip npm's ridiculous error epilogue>

The gist is that postinstall is running either before the dependencies (like rimraf) are installed, or just without access to them somehow.