GoogleChrome / webdev-infra

Apache License 2.0
37 stars 28 forks source link

i18n util fails if projects are run from a path with spaces in it #66

Closed supermoos closed 1 year ago

supermoos commented 1 year ago

Describe the bug After having followed the setup instructions, I'm trying to run ´npm run dev´ but it fails with this error:

site/_js/main.js, site/_js/100.js, site/_js/events.js, site/_js/styleguide.js, site/_js/fugu-showcase.js → dist/js...
created dist/js in 217ms

> developer.chrome.com@1.0.0 eleventy
> eleventy

[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] No translations for: i18n.authors.timstatler.title (via Error)
[11ty]
[11ty] Original error stack trace: Error: No translations for: i18n.authors.timstatler.title
[11ty]     at I18nDictionary.get (/Users/obfuscatedusername/Dropbox (Personal)/projects/developer_chrome_com/developer.chrome.com/node_modules/webdev-infra/utils/i18nDictionary.js:84:13)
[11ty]     at I18nFilter.filter (/Users/obfuscatedusername/Dropbox (Personal)/projects/developer_chrome_com/developer.chrome.com/node_modules/webdev-infra/filters/i18n.js:52:29)
[11ty]     at /Users/obfuscatedusername/Dropbox (Personal)/projects/developer_chrome_com/developer.chrome.com/site/en/authors/authors.11tydata.js:24:9
[11ty]     at Array.sort (<anonymous>)
[11ty]     at Object.before (/Users/obfuscatedusername/Dropbox (Personal)/projects/developer_chrome_com/developer.chrome.com/site/en/authors/authors.11tydata.js:23:22)
[11ty]     at Pagination._resolveItems (/Users/obfuscatedusername/Dropbox (Personal)/projects/developer_chrome_com/developer.chrome.com/node_modules/@11ty/eleventy/src/Plugins/Pagination.js:175:37)
[11ty]     at Pagination.setData (/Users/obfuscatedusername/Dropbox (Personal)/projects/developer_chrome_com/developer.chrome.com/node_modules/@11ty/eleventy/src/Plugins/Pagination.js:96:26)
[11ty]     at new Pagination (/Users/obfuscatedusername/Dropbox (Personal)/projects/developer_chrome_com/developer.chrome.com/node_modules/@11ty/eleventy/src/Plugins/Pagination.js:19:10)
[11ty]     at Template.getTemplates (/Users/obfuscatedusername/Dropbox (Personal)/projects/developer_chrome_com/developer.chrome.com/node_modules/@11ty/eleventy/src/Template.js:724:21)
[11ty]     at TemplateMap.initDependencyMap (/Users/obfuscatedusername/Dropbox (Personal)/projects/developer_chrome_com/developer.chrome.com/node_modules/@11ty/eleventy/src/TemplateMap.js:288:41)
[11ty] Wrote 0 files in 2.14 seconds (v1.0.2)
ERROR: "eleventy" exited with 1.

To Reproduce Steps to reproduce the behavior: clone the repo, run npm ci and then run npm run dev, error appears.

Expected behavior Site should build for dev.

Desktop (please complete the following information):

Additional context Is there perhaps some step missing in the setup instructions?

matthiasrohmer commented 1 year ago

That actually shouldn't happen. On which commit are you, for me to reproduce?

supermoos commented 1 year ago

Main branch, just pulled and there were som changes, but still the same error. Here's the latest pull log.


   4e8a9ace..60197e1f  main                    -> origin/main
   4c6fa1ec..1610ae35  YouTubeExternalDataFlow -> origin/YouTubeExternalDataFlow
 * [new branch]        fledge-spiffing         -> origin/fledge-spiffing
   6fa046a2..5738316c  jr-event-filters        -> origin/jr-event-filters
Updating 4e8a9ace..60197e1f
Fast-forward```
supermoos commented 1 year ago

Do let me know if there's anything I can do to help resolve this bug.

supermoos commented 1 year ago

So we managed to narrow down the bug. Seems the project doesn't like being run from a folder with spaces in. So because I had cloned it into "../Dropbox (Personal)/.." it didn't work.

matthiasrohmer commented 1 year ago

Thanks, @supermoos for narrowing it down. That's actually a bug we should fix.