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

Fix createTempDir use of tmp package #1403

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
@davewasmer

davewasmer commented Jul 11, 2014

The tmp package updated it's API to return a cleanup callback in addition to just the directory name. Q then squashes the two arguments to the callback into an array, while bower expected just a string for the directory name.

This causes "TypeError: Arguments to path.join must be strings" errors to appear, seemingly non-deterministic, because various spots attempt to use the _tempDir value (now an array) to join into a path.

semver ftw!

edit: added error details for those searching

Fix createTempDir use of tmp package
The tmp package updated it's API to return a cleanup callback in addition to just the directory name. Q then squashes the two arguments to the callback into an array, while bower expected just a string for the directory name.
@KenjiTakahashi

This comment has been minimized.

Show comment
Hide comment
@KenjiTakahashi

KenjiTakahashi Jul 11, 2014

You're missing a semicolon at :172 :-).

But 👍 generally, just went in to post the same exact thing, basically. After spending ~1 hour on looking why it all broke down suddenly...

KenjiTakahashi commented Jul 11, 2014

You're missing a semicolon at :172 :-).

But 👍 generally, just went in to post the same exact thing, basically. After spending ~1 hour on looking why it all broke down suddenly...

@transitive-bullshit

This comment has been minimized.

Show comment
Hide comment
@transitive-bullshit

transitive-bullshit Jul 11, 2014

Do you know the easiest workaround to still use bower locally til this makes it onto npm?

transitive-bullshit commented Jul 11, 2014

Do you know the easiest workaround to still use bower locally til this makes it onto npm?

@jrschumacher

This comment has been minimized.

Show comment
Hide comment
@jrschumacher

jrschumacher commented Jul 11, 2014

👍

@Keoven

This comment has been minimized.

Show comment
Hide comment
@Keoven

Keoven Jul 11, 2014

Easiest workaround for me atm is to downgrade to 0.9.2

Keoven commented Jul 11, 2014

Easiest workaround for me atm is to downgrade to 0.9.2

@davewasmer

This comment has been minimized.

Show comment
Hide comment
@davewasmer

davewasmer Jul 11, 2014

@fisch0920 you could manually install the previous version of tmp (0.0.23) inside your bower installation. Just make sure you are overwriting the correct copy (the global copy if you installed it globally).

davewasmer commented Jul 11, 2014

@fisch0920 you could manually install the previous version of tmp (0.0.23) inside your bower installation. Just make sure you are overwriting the correct copy (the global copy if you installed it globally).

@weaverryan

This comment has been minimized.

Show comment
Hide comment
@weaverryan

weaverryan Jul 11, 2014

@davewasmer were just chatting about this (#1404 (comment)) (and I'm by no means for sure right), but as this was caused by a BC break on a minor version release of tmp (0.0.23 to 0.0.24), I think this should be fixed in that library. But again, I could be wrong about that, and this will definitely fix the error.

Cheers!

weaverryan commented Jul 11, 2014

@davewasmer were just chatting about this (#1404 (comment)) (and I'm by no means for sure right), but as this was caused by a BC break on a minor version release of tmp (0.0.23 to 0.0.24), I think this should be fixed in that library. But again, I could be wrong about that, and this will definitely fix the error.

Cheers!

@GeoffreyPlitt

This comment has been minimized.

Show comment
Hide comment
@GeoffreyPlitt

GeoffreyPlitt Jul 11, 2014

If it helps anybody, my fork has the fix (pinned 0.0.23) and you can put this in your npm to use it: "bower":"git+ssh://git@github.com:GeoffreyPlitt/bower.git"

GeoffreyPlitt commented Jul 11, 2014

If it helps anybody, my fork has the fix (pinned 0.0.23) and you can put this in your npm to use it: "bower":"git+ssh://git@github.com:GeoffreyPlitt/bower.git"

@jasonmit

This comment has been minimized.

Show comment
Hide comment
@jasonmit

jasonmit Jul 11, 2014

So much for minor releases not changing APIs! Here is how I fixed it temporarily on my project.

"devDependencies": {
    "tmp": "0.0.23",
    "bower": "1.3.6",
 ...
}

jasonmit commented Jul 11, 2014

So much for minor releases not changing APIs! Here is how I fixed it temporarily on my project.

"devDependencies": {
    "tmp": "0.0.23",
    "bower": "1.3.6",
 ...
}
@transitive-bullshit

This comment has been minimized.

Show comment
Hide comment
@transitive-bullshit

transitive-bullshit Jul 11, 2014

Awesome -- thanks for the quick advice on workarounds. Bower rocks!

transitive-bullshit commented Jul 11, 2014

Awesome -- thanks for the quick advice on workarounds. Bower rocks!

@heygrady

This comment has been minimized.

Show comment
Hide comment
@heygrady

heygrady Jul 11, 2014

Holy cow. What a waste of time.

I hotfixed my local by navigating to the global bower install (/usr/lib/node_modules/bower on my Ubuntu install) and ran sudo npm uninstall tmp && sudo npm install tmp@0.0.23 and then everything worked.

Hopefully a new version of bower can be released that pegs the tmp package to the non-breaking version until bower can be upgraded to use the new callback interface. I'm glad I finally found this thread.

heygrady commented Jul 11, 2014

Holy cow. What a waste of time.

I hotfixed my local by navigating to the global bower install (/usr/lib/node_modules/bower on my Ubuntu install) and ran sudo npm uninstall tmp && sudo npm install tmp@0.0.23 and then everything worked.

Hopefully a new version of bower can be released that pegs the tmp package to the non-breaking version until bower can be upgraded to use the new callback interface. I'm glad I finally found this thread.

@karlkeefer

This comment has been minimized.

Show comment
Hide comment
@karlkeefer

karlkeefer Jul 11, 2014

👍 Glad I found this thread, too. Thanks for the easy workaround @jasonmit

karlkeefer commented Jul 11, 2014

👍 Glad I found this thread, too. Thanks for the easy workaround @jasonmit

@twmulloy

This comment has been minimized.

Show comment
Hide comment
@twmulloy

twmulloy Jul 11, 2014

@GeoffreyPlitt and @jasonmit gracias amigos, spent my morning trying to get bower working, both of your solutions worked for me.

twmulloy commented Jul 11, 2014

@GeoffreyPlitt and @jasonmit gracias amigos, spent my morning trying to get bower working, both of your solutions worked for me.

@everpeace

This comment has been minimized.

Show comment
Hide comment
@everpeace

everpeace Jul 11, 2014

👍 I really appreciate your nice quick recovery!! Thanks @GeoffreyPlitt and @jasonmit !!

everpeace commented Jul 11, 2014

👍 I really appreciate your nice quick recovery!! Thanks @GeoffreyPlitt and @jasonmit !!

@mutkan

This comment has been minimized.

Show comment
Hide comment
@mutkan

mutkan Jul 11, 2014

bower.json;
{
"name": "angularjs-demo",
"version": "0.0.0",
"dependencies": {
"angular": "1.2.16",
"json3": "~3.3.1",
"es5-shim": "~3.1.0",
"bootstrap": "~3.2.0",
"angular-resource": "1.2.16",
"angular-cookies": "1.2.16",
"angular-sanitize": "1.2.16",
"angular-animate": "1.2.16",
"angular-touch": "1.2.16"
},
"devDependencies": {
"tmp": "0.0.23",
"bower": "1.3.6",
"angular-mocks": "1.2.16",
"angular-scenario": "1.2.16"
},
"appPath": "app"
}

System info:
Bower version: 1.3.7
Node version: 0.10.29
OS: Darwin 13.3.0 x64

gmc:angularjs-demo gmc$ bower cache clean
gmc:angularjs-demo gmc$ bower install
bower angular-resource#1.2.16 not-cached git://github.com/angular/bower-angular-resource.git#1.2.16
bower angular-resource#1.2.16 resolve git://github.com/angular/bower-angular-resource.git#1.2.16
bower angular#1.2.16 not-cached git://github.com/angular/bower-angular.git#1.2.16
bower angular#1.2.16 resolve git://github.com/angular/bower-angular.git#1.2.16
bower es5-shim#~3.1.0 not-cached git://github.com/es-shims/es5-shim.git#~3.1.0
bower es5-shim#~3.1.0 resolve git://github.com/es-shims/es5-shim.git#~3.1.0
bower json3#~3.3.1 not-cached git://github.com/bestiejs/json3.git#~3.3.1
bower json3#~3.3.1 resolve git://github.com/bestiejs/json3.git#~3.3.1
bower bootstrap#~3.2.0 not-cached git://github.com/twbs/bootstrap.git#~3.2.0
bower bootstrap#~3.2.0 resolve git://github.com/twbs/bootstrap.git#~3.2.0
bower angular-cookies#1.2.16 not-cached git://github.com/angular/bower-angular-cookies.git#1.2.16
bower angular-cookies#1.2.16 resolve git://github.com/angular/bower-angular-cookies.git#1.2.16
bower angular-sanitize#1.2.16 not-cached git://github.com/angular/bower-angular-sanitize.git#1.2.16
bower angular-sanitize#1.2.16 resolve git://github.com/angular/bower-angular-sanitize.git#1.2.16
bower angular-animate#1.2.16 not-cached git://github.com/angular/bower-angular-animate.git#1.2.16
bower angular-animate#1.2.16 resolve git://github.com/angular/bower-angular-animate.git#1.2.16
bower angular-touch#1.2.16 not-cached git://github.com/angular/bower-angular-touch.git#1.2.16
bower angular-touch#1.2.16 resolve git://github.com/angular/bower-angular-touch.git#1.2.16
bower bower#1.3.6 not-cached git://github.com/theshock/atomjs.git#1.3.6
bower bower#1.3.6 resolve git://github.com/theshock/atomjs.git#1.3.6
bower angular-scenario#1.2.16 not-cached git://github.com/angular/bower-angular-scenario.git#1.2.16
bower angular-scenario#1.2.16 resolve git://github.com/angular/bower-angular-scenario.git#1.2.16
bower angular-mocks#1.2.16 not-cached git://github.com/angular/bower-angular-mocks.git#1.2.16
bower angular-mocks#1.2.16 resolve git://github.com/angular/bower-angular-mocks.git#1.2.16
bower tmp#0.0.23 ENOTFOUND Package tmp not found

mutkan commented Jul 11, 2014

bower.json;
{
"name": "angularjs-demo",
"version": "0.0.0",
"dependencies": {
"angular": "1.2.16",
"json3": "~3.3.1",
"es5-shim": "~3.1.0",
"bootstrap": "~3.2.0",
"angular-resource": "1.2.16",
"angular-cookies": "1.2.16",
"angular-sanitize": "1.2.16",
"angular-animate": "1.2.16",
"angular-touch": "1.2.16"
},
"devDependencies": {
"tmp": "0.0.23",
"bower": "1.3.6",
"angular-mocks": "1.2.16",
"angular-scenario": "1.2.16"
},
"appPath": "app"
}

System info:
Bower version: 1.3.7
Node version: 0.10.29
OS: Darwin 13.3.0 x64

gmc:angularjs-demo gmc$ bower cache clean
gmc:angularjs-demo gmc$ bower install
bower angular-resource#1.2.16 not-cached git://github.com/angular/bower-angular-resource.git#1.2.16
bower angular-resource#1.2.16 resolve git://github.com/angular/bower-angular-resource.git#1.2.16
bower angular#1.2.16 not-cached git://github.com/angular/bower-angular.git#1.2.16
bower angular#1.2.16 resolve git://github.com/angular/bower-angular.git#1.2.16
bower es5-shim#~3.1.0 not-cached git://github.com/es-shims/es5-shim.git#~3.1.0
bower es5-shim#~3.1.0 resolve git://github.com/es-shims/es5-shim.git#~3.1.0
bower json3#~3.3.1 not-cached git://github.com/bestiejs/json3.git#~3.3.1
bower json3#~3.3.1 resolve git://github.com/bestiejs/json3.git#~3.3.1
bower bootstrap#~3.2.0 not-cached git://github.com/twbs/bootstrap.git#~3.2.0
bower bootstrap#~3.2.0 resolve git://github.com/twbs/bootstrap.git#~3.2.0
bower angular-cookies#1.2.16 not-cached git://github.com/angular/bower-angular-cookies.git#1.2.16
bower angular-cookies#1.2.16 resolve git://github.com/angular/bower-angular-cookies.git#1.2.16
bower angular-sanitize#1.2.16 not-cached git://github.com/angular/bower-angular-sanitize.git#1.2.16
bower angular-sanitize#1.2.16 resolve git://github.com/angular/bower-angular-sanitize.git#1.2.16
bower angular-animate#1.2.16 not-cached git://github.com/angular/bower-angular-animate.git#1.2.16
bower angular-animate#1.2.16 resolve git://github.com/angular/bower-angular-animate.git#1.2.16
bower angular-touch#1.2.16 not-cached git://github.com/angular/bower-angular-touch.git#1.2.16
bower angular-touch#1.2.16 resolve git://github.com/angular/bower-angular-touch.git#1.2.16
bower bower#1.3.6 not-cached git://github.com/theshock/atomjs.git#1.3.6
bower bower#1.3.6 resolve git://github.com/theshock/atomjs.git#1.3.6
bower angular-scenario#1.2.16 not-cached git://github.com/angular/bower-angular-scenario.git#1.2.16
bower angular-scenario#1.2.16 resolve git://github.com/angular/bower-angular-scenario.git#1.2.16
bower angular-mocks#1.2.16 not-cached git://github.com/angular/bower-angular-mocks.git#1.2.16
bower angular-mocks#1.2.16 resolve git://github.com/angular/bower-angular-mocks.git#1.2.16
bower tmp#0.0.23 ENOTFOUND Package tmp not found

@halan

This comment has been minimized.

Show comment
Hide comment
@halan

halan Jul 11, 2014

It works for me! 👍 :shipit:

halan commented Jul 11, 2014

It works for me! 👍 :shipit:

@mauriciovieira

This comment has been minimized.

Show comment
Hide comment
@mauriciovieira

mauriciovieira Jul 11, 2014

It works for me, too! 👍:shipit:

mauriciovieira commented Jul 11, 2014

It works for me, too! 👍:shipit:

@karlkeefer

This comment has been minimized.

Show comment
Hide comment
@karlkeefer

karlkeefer Jul 11, 2014

@mutkan you need to put

"tmp": "0.0.23",
"bower": "1.3.6",

in package.json instead of bower.json

karlkeefer commented Jul 11, 2014

@mutkan you need to put

"tmp": "0.0.23",
"bower": "1.3.6",

in package.json instead of bower.json

@macedo

This comment has been minimized.

Show comment
Hide comment
@macedo

macedo Jul 11, 2014

works for me! 👍

macedo commented Jul 11, 2014

works for me! 👍

@gabegorelick

This comment has been minimized.

Show comment
Hide comment
@gabegorelick

gabegorelick Jul 11, 2014

As previously mentioned, this is technically not an issue with tmp breaking semver since they are still in the 0.0.x range. This means bower really should be pinning tmp to a single version, especially if they don't plan on maintaining BC. I believe this is what npm does by default for 0.0.x dependencies.

gabegorelick commented Jul 11, 2014

As previously mentioned, this is technically not an issue with tmp breaking semver since they are still in the 0.0.x range. This means bower really should be pinning tmp to a single version, especially if they don't plan on maintaining BC. I believe this is what npm does by default for 0.0.x dependencies.

@samccone

This comment has been minimized.

Show comment
Hide comment
@samccone

samccone Jul 11, 2014

Member

TIL Everything in bower should be hard locked because people do not follow semver. (and yes this was not a problem with semver ... but pinning everything would have fixed this)

Member

samccone commented Jul 11, 2014

TIL Everything in bower should be hard locked because people do not follow semver. (and yes this was not a problem with semver ... but pinning everything would have fixed this)

twistedvisions pushed a commit to twistedvisions/anaximander that referenced this pull request Jul 19, 2014

matthewp added a commit to matthewp/syn that referenced this pull request Jul 25, 2014

Workaround bower installation bug
Works around this temporarily: bower/bower#1403

@jo-soft jo-soft referenced this pull request Jul 28, 2014

Closed

grunt install fails #1

mindreframer added a commit to mindreframer/react-starter-template that referenced this pull request Aug 3, 2014

sicongtang added a commit to inspawn/website that referenced this pull request Aug 6, 2014

jvandemo added a commit to jvandemo/angular-growl-notifications that referenced this pull request Aug 16, 2014

gabegorelick added a commit to gabegorelick/fracas that referenced this pull request Sep 2, 2014

bkeepers added a commit to bkeepers/github-notifications that referenced this pull request Sep 20, 2014

@bkeepers bkeepers referenced this pull request Sep 20, 2014

Closed

Fix the build #121

mjumbewu added a commit to openplans/hatch that referenced this pull request Sep 26, 2014

spitlo added a commit to libris/kitin that referenced this pull request Sep 30, 2014

@contolini contolini referenced this pull request Oct 3, 2014

Merged

Bump grunt-bower-task #11

liamjones added a commit to liamjones/webhook-cms that referenced this pull request Dec 14, 2014

ghillert pushed a commit to ghillert/spring-xd-admin-ui-client that referenced this pull request Apr 21, 2015

mjstahl added a commit to bitovi/funcunit that referenced this pull request Jun 19, 2015

Correct FuncUnit.win documentation
Updated bower dep and included documentjs as dev dep

Had to increase the bower version due to the following issue: bower/bower#1403
If documentjs is used to generate the documentation, it should at least be included as a dev dependency just like grunt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment