Comments (20)
Thanks, done
from gulp-google-webfonts.
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.
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.
Is v5.10.1 old? When I replace "path.posix.join" with "path.join" it works.
from gulp-google-webfonts.
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.
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.
I am on Windows 10 and it only works when I remove posix.
from gulp-google-webfonts.
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.
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.
Are you definitely loading the built-in path
module and not some external one?
from gulp-google-webfonts.
"dependencies": { "bower": "^1.7.7", "del": "^2.2.0", "path": "^0.12.7" },
from gulp-google-webfonts.
You're probably not using the built-in if it's listed in package.json
dependencies.
from gulp-google-webfonts.
ok, let me correct that.
from gulp-google-webfonts.
Same thing.
from gulp-google-webfonts.
Have you removed the external path
module completely or just from package.json
?
from gulp-google-webfonts.
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.
I ran npm uninstall path
.
from gulp-google-webfonts.
I also ran npm -g uninstall path --save
from gulp-google-webfonts.
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.
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)
- support fonts.list as string and not only from file HOT 1
- Support for SVG and EOT formats HOT 3
- &subset=cyrillic wrong font download
- Missing local src HOT 1
- Support for generate css with woff and woff2 fonts HOT 1
- How to set path for fonts in generated CSS? HOT 1
- woff2? HOT 4
- version without gulp? HOT 1
- HTTPS support HOT 3
- Set site root as font url HOT 1
- build fonts.list for gulp-google-webfonts HOT 1
- Error: connect ECONNREFUSED 127.0.0.1:443 (Oswald font only) HOT 4
- Process multiple font formats HOT 1
- New npm package for v3
- Attribute font-stretch doesn't match the regex HOT 1
- Example gulpfile.js's outdated
- "Google Format" wrong
- Alternative path to fonts for @font-face rules
- Fonts dir with starting slash
- Option to pass string instead of a file name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-google-webfonts.