π go check out my website instead
clenemt / eleventy-webpack Goto Github PK
View Code? Open in Web Editor NEWA barebone Eleventy and Webpack boilerplate π
Home Page: https://eleventy-webpack.netlify.app
License: MIT License
A barebone Eleventy and Webpack boilerplate π
Home Page: https://eleventy-webpack.netlify.app
License: MIT License
π go check out my website instead
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to https://artifactory.ubisoft.org/api/npm/npm/upper-case/-/upper-case-1.1.3.tgz failed, reason: getaddrinfo ENOTFOUND artifactory.ubisoft.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
In shortcode.js the right angle bracket is missing in the Figure tag
It will be:
<figure class="${className ? `fig-${className}` : ''}">
On freshly cloned repository, "npm i" will result in dependency error:
myuser@My-MacBook-Pro eleventy-webpack-orig % npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: eleventy-webpack@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/markdown-it
npm ERR! dev markdown-it@"^12.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer markdown-it@">= 9.0.0 < 12.0.0" from [email protected]
npm ERR! node_modules/markdown-it-attrs
npm ERR! dev markdown-it-attrs@"^3.0.3" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/myuser/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/myuser/.npm/_logs/2021-02-22T10_55_22_280Z-debug.log
Steps to reproduce:
Hi,
Am new to eleventy and am using this starter, which is great.
The issue I am getting is when I save a file it takes a long time to render the updates
Copied 186 files / Wrote 30 files in 81.07 seconds (2702.3ms each, v0.12.1)
[start:eleventy] [Browsersync] Reloading Browsers...
These are just about 24 hard coded njk pages and 6 blog posts, it just hangs on reloading browser.
Debug shows this, not sure is this normal performance ?
β BEST-Static git:(main) DEBUG=Eleventy:Benchmark* npx @11ty/eleventy
Eleventy:Benchmark Benchmark (Configuration): "slug" Nunjucks Filter took 1ms (0.0%, called 8Γ, 0.1ms each) +0ms
Eleventy:Benchmark Benchmark (Configuration): "url" Nunjucks Filter took 4ms (0.0%, called 10Γ, 0.4ms each) +1ms
Eleventy:Benchmark Benchmark (Configuration): "displayPostedDate" Nunjucks Filter took 19ms (0.0%, called 18Γ, 1.0ms each) +0ms
Eleventy:Benchmark Benchmark (Configuration): "format" Nunjucks Filter took 1ms (0.0%, called 28Γ, 0.1ms each) +0ms
Eleventy:Benchmark Benchmark (Configuration): "formatISO" Nunjucks Filter took 1ms (0.0%, called 28Γ, 0.0ms each) +1ms
Eleventy:Benchmark Benchmark (Configuration): "image" Nunjucks Async Shortcode took 46ms (0.1%, called 320Γ, 0.1ms each) +0ms
Eleventy:Benchmark Benchmark (Configuration): "webpack" Nunjucks Async Shortcode took 2ms (0.0%, called 56Γ, 0.0ms each) +0ms
Eleventy:Benchmark Benchmark (Aggregate): Configuration addPlugin took 2ms (0.0%, called 3Γ, 0.6ms each) +0ms
Eleventy:Benchmark Benchmark (Aggregate): Searching the file system took 36ms (0.0%, called 3Γ, 12.1ms each) +0ms
Eleventy:Benchmark Benchmark (Aggregate): Data File took 2ms (0.0%, called 9Γ, 0.2ms each) +0ms
Eleventy:Benchmark Benchmark (Aggregate): Passthrough Copy File took 973ms (1.2%, called 186Γ, 5.2ms each) +0ms
Eleventy:Benchmark Benchmark (Aggregate): Template Read took 497ms (0.6%, called 58Γ, 8.6ms each) +0ms
Eleventy:Benchmark Benchmark (Aggregate): Template Compile took 1ms (0.0%, called 86Γ, 0.0ms each) +1ms
Eleventy:Benchmark Benchmark (Aggregate): Template Render took 74481ms (95.0%, called 50Γ, 1489.6ms each) +0ms
Eleventy:Benchmark Benchmark (Aggregate): Template Write took 1426ms (1.8%, called 30Γ, 47.5ms each) +0ms
Eleventy:Benchmark Benchmark (Data): ./src/case-studies/case-studies.11tydata.json
took 1ms (0.0%, called 3Γ, 0.2ms each) +0ms
Eleventy:Benchmark Benchmark (Data): ./src/blog/blog.11tydata.json
took 1ms (0.0%, called 5Γ, 0.1ms each) +0ms
Copied 186 files / Wrote 30 files in 76.99 seconds (2566.3ms each, v0.12.1)
Start time: (2021-04-21 21:45:06 UTC) [treshold=1%]
1 /Documents/BEST-Static/.eleventy.js (.eleventy.js) 1.3s ββ 2%
2 ./Config (node_modules/@11ty/eleventy/src/Config.js) 1.4s ββ 2%
3 ./TemplateEngineManager (node_module...venty/src/TemplateEngineManager.js) 1.4s ββ 2%
4 ./EleventyExtensionMap (node_modules...eventy/src/EleventyExtensionMap.js) 1.4s ββ 2%
5 ./TemplateRender (node_modules/@11ty/eleventy/src/TemplateRender.js) 1.4s ββ 2%
6 ./TemplateData (node_modules/@11ty/eleventy/src/TemplateData.js) 1.6s ββ 2%
7 ./src/Eleventy (node_modules/@11ty/eleventy/src/Eleventy.js) 1.7s ββ 2%
Total require(): 3041
Total time: 1m 18.8s
FYI, after updating @11ty/eleventy-img
to 0.8.0 I was getting this error:
TypeError: Cannot read property 'reverse' of undefined
eleventy-webpack/utils/shortcodes.js
Line 86 in 2b0242d
After reading through the changes, it turned out to be related to this fix 11ty/eleventy-img#64 (comment).
Regardless of whether the source image uses the jpg
or jpeg
extension, the returned object will use the jpeg
key.
Hereβs how I fixed it in my project:
let extension = path.extname(src).slice(1).toLowerCase();
// Normalize βjpgβ extension to match what @11ty/eleventy-img does
extension = extension == 'jpg' ? 'jpeg' : extension;
This issue basically explains how to do it
And i've tried to implement it like so:
// shortcodes.js
imageCss: () => {
function generateImages(genSrc, genWidths){
let source = path.join(__dirname, "_includes/" , src);
let options = {
widths: widths,
formats: ['jpeg', 'jpg'],
outputDir: "./_site/assets/images",
urlPath: "assets/images/",
useCache: true,
sharpJpegOptions: {
quality: 99,
progressive: true
}
};
// genrate images, ! dont wait
Image(source, options);
// get metadata even the image are not fully generated
return Image.statsSync(source, options);
}
function imageCssBackground (){
const metadata = generateImages(src, widths);
let markup = [`${selector} { background-image: url(${metadata.jpeg[0].url});} `];
// i use always jpeg for backgrounds
metadata.jpeg.slice(1).forEach((image, idx) => {
markup.push(`@media (min-width: ${metadata.jpeg[idx].width}px) { ${selector} {background-image: url(${image.url});}}`);
});
return markup.join("");
}
return console.log(imageCssBackground);
},
and the css is the same as in the issue,
I know my data is flowing through, but as Im quite new to eleventy I am
unsure how to debug this, as you see I return a console.log of the function
but this isnt much help, the console just throws a "no such file or directory, open '_site/404.html'"
I get the following error when I try and build the site.
SyntaxError
was thrown:
const lazy = args[4] ?? true;
Here are the two lines that have ? in them. Not sure what is wrong as I don't develop.
onst lazy = args[4] ?? true;
const sizes = args[5] ?? defaultSizes;
Could the problem be the ? mark?
Thanks,
Paul
Steps to reproduce:
I don't have any proxy setup and don't need one.
Error:
npm i
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to https://artifactory.ubisoft.org/api/npm/npm/html-minifier/-/html-minifier-4.0.0.tgz failed, reason: getaddrinfo ENOTFOUND artifactory.ubisoft.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/myuser/.npm/_logs/2021-02-22T10_41_32_057Z-debug.log
Workaround:
delete package-lock.json:
rm package-lock.json
npm i
Is anyone experiencing Module build failure? I am getting the following message:
[start:webpack ] Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
[start:webpack ] ModuleBuildError: Module build failed (from ./node_modules/css-loader/dist/cjs.js):
[start:webpack ] Error: Can't resolve '/assets/static/venus-velocity-thumbnail.jpg' in '/Users/daniellee/eleventy-webpack-starter-project-20210412-wedding/src/assets/styles'
Any solutions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.