Giter Club home page Giter Club logo

Comments (20)

battlesnake avatar battlesnake commented on July 21, 2024

Thanks, done

from gulp-google-webfonts.

gyretech avatar gyretech commented on July 21, 2024

This change causes the following error:

request.name = path.posix.join(options.fontsDir, request.name);
                                          ^
TypeError: Cannot call method 'join' of undefined

from gulp-google-webfonts.

battlesnake avatar battlesnake commented on July 21, 2024

You're probably using an old version of Node, path.posix.join is in the spec: https://nodejs.org/api/path.html#path_path_posix

from gulp-google-webfonts.

gyretech avatar gyretech commented on July 21, 2024

Is v5.10.1 old? When I replace "path.posix.join" with "path.join" it works.

from gulp-google-webfonts.

battlesnake avatar battlesnake commented on July 21, 2024

v5.10.1 isn't old, however path.posix.join is in the official docs, and path.join will break on Windows (a previous PR changed it to the POSIX version). Since the POSIX version is in the official docs, I'm not going to make any changes here.

Are you definitely loading the built-in path module and not some external one?

from gulp-google-webfonts.

battlesnake avatar battlesnake commented on July 21, 2024

It works for me using Node v5.10.1 and NPM v3.8.6 on Arch Linux - what distro are you using?

from gulp-google-webfonts.

gyretech avatar gyretech commented on July 21, 2024

I am on Windows 10 and it only works when I remove posix.

from gulp-google-webfonts.

gyretech avatar gyretech commented on July 21, 2024
F:\Website\node_modules\gulp-google-webfonts\index.js:209
                request.name = path.posix.join(options.fontsDir, request.name);
                                          ^
TypeError: Cannot call method 'join' of undefined
    at makeFontFace (F:\Website\node_modules\gulp-google-webfonts\index.js:209:31)
    at Array.map (native)
    at generateFontCss (F:\Website\node_modules\gulp-google-webfonts\index.js:204:6)
    at parseCss (F:\Website\node_modules\gulp-google-webfonts\index.js:191:4)
    at fn (F:\Website\node_modules\gulp-google-webfonts\node_modules\async\lib\async.js:638:34)
    at Object._onImmediate (F:\Website\node_modules\gulp-google-webfonts\node_modules\async\lib\async.js:554:34)
    at processImmediate [as _immediateCallback] (timers.js:345:15)
Process terminated with code 8.

from gulp-google-webfonts.

battlesnake avatar battlesnake commented on July 21, 2024

Ok - I've no idea then. I'll leave the .posix. in, as it's documented and works on Linux and whatever version of Windows the person who originally added it uses.

from gulp-google-webfonts.

battlesnake avatar battlesnake commented on July 21, 2024

Are you definitely loading the built-in path module and not some external one?

from gulp-google-webfonts.

gyretech avatar gyretech commented on July 21, 2024

"dependencies": { "bower": "^1.7.7", "del": "^2.2.0", "path": "^0.12.7" },

from gulp-google-webfonts.

battlesnake avatar battlesnake commented on July 21, 2024

You're probably not using the built-in if it's listed in package.json dependencies.

from gulp-google-webfonts.

gyretech avatar gyretech commented on July 21, 2024

ok, let me correct that.

from gulp-google-webfonts.

gyretech avatar gyretech commented on July 21, 2024

Same thing.

from gulp-google-webfonts.

battlesnake avatar battlesnake commented on July 21, 2024

Have you removed the external path module completely or just from package.json?

from gulp-google-webfonts.

battlesnake avatar battlesnake commented on July 21, 2024

When you've removed it completely, the plugin will work, as you're using the same version of Node as me

from gulp-google-webfonts.

gyretech avatar gyretech commented on July 21, 2024

I ran npm uninstall path.

from gulp-google-webfonts.

gyretech avatar gyretech commented on July 21, 2024

I also ran npm -g uninstall path --save

from gulp-google-webfonts.

gyretech avatar gyretech commented on July 21, 2024

So I am the only one having this issue?
I am on Windows
request.name = path.join(options.fontsDir, request.name); works perfectly fine

But request.name = path.posix.join(options.fontsDir, request.name); gives me an error cannot call method join.

from gulp-google-webfonts.

battlesnake avatar battlesnake commented on July 21, 2024

Apparently. If you were loading the built-in path module and it's up to date then you wouldn't have this problem. Somewhere, you have a 3rd-party or out-dated version of it which is being loaded. Do any of the project's parent folders also contain a node_modules folder?

from gulp-google-webfonts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.