Skip to content

bug on create cloud #344

Description

@leibale
var cloud = require('gcloud').storage({
    projectId: config.get('google:cloud:id'),
    keyFilename: 'path/to/google/key.json'
});

and node throw this error:

path.js:360
        throw new TypeError('Arguments to path.join must be strings');
              ^
TypeError: Arguments to path.join must be strings
    at path.js:360:15
    at Array.filter (native)
    at Object.exports.join (path.js:358:36)
    at Object.<anonymous> (path/to/project/folder/node_modules/gcloud/node_modules/configstore/node_modules/xdg-basedir/index.js:6:42)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)

in version 0.11.0 it's working

thanks

Activity

  1. ryanseys commented on Jan 13, 2015

    @ryanseys
    Contributor

    Hi, thanks for the report. What is the typeof config.get('google:cloud:id')? Is it not a string?

  2. ryanseys commented on Jan 13, 2015

    @ryanseys
    Contributor

    Or how are you passing in the path to your key? The actual code snippet instead of a fake path/to/google/key.json might help us track down the issue.

  3. stephenplusplus commented on Jan 13, 2015

    @stephenplusplus
    Contributor

    It looks like a dependency (user-home) of a dependency (xdg-basedir) of a dependency (configstore) of our library can't figure out your home directory: https://github.com/sindresorhus/user-home/blob/master/index.js

    Is there any reason your system wouldn't be able to satisfy the search for a home directory here? https://github.com/sindresorhus/user-home/blob/master/index.js

    If nothing else, it looks like setting the environment variable "HOME" with a path to your home directory will give Configstore a place to read and write files.

  4. sindresorhus commented on Jan 13, 2015

    @sindresorhus
  5. stephenplusplus commented on Jan 13, 2015

    @stephenplusplus
    Contributor

    I think it's crashing before it gets to that point. https://github.com/sindresorhus/user-home/blob/master/index.js#L13 -- that must be returning undefined to https://github.com/sindresorhus/xdg-basedir/blob/master/index.js#L6

  6. sindresorhus commented on Jan 13, 2015

    @sindresorhus
  7. sindresorhus commented on Jan 13, 2015

    @sindresorhus

    It's really annoying we don't have a reliable way to get the home directory in Node... (libuv/libuv#11)

  8. changed the title [-]googlebug on create cloud[/-] [+]bug on create cloud[/+] on Jan 13, 2015
  9. stephenplusplus commented on Jan 13, 2015

    @stephenplusplus
    Contributor

    @sindresorhus thanks!

    @leibale if you are still experiencing issues with gcloud, please re-open.

  10. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: storageIssues related to the Cloud Storage API.
    on Feb 2, 2015
  11. added this to the Storage Stable milestone on Feb 2, 2015
  12. 38 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions