Closed jaanli closed 6 months ago
Trying something like a bisect here - looks like the above commands work on an earlier version of Observable Framework:
cp observable-framework-maps/docs/data/cb_2018_us_zcta510_500k_nolimit.pmtiles american-community-survey/docs/data/
cp observable-framework-maps/docs/example-map.md american-community-survey/docs
cd american-community-survey
yarn dev
This runs fine.
package.json
from https://github.com/jaanli/american-community-survey/ -
{
"type": "module",
"private": true,
"scripts": {
"clean": "rm -rf docs/.observablehq/cache",
"build": "rm -rf dist && observable build",
"dev": "observable preview",
"deploy": "observable deploy",
"observable": "observable"
},
"dependencies": {
"@observablehq/framework": "latest",
"d3-dsv": "^3.0.1",
"d3-time-format": "^4.1.0"
},
"engines": {
"node": ">=20.6"
}
}
cc @Fil in case you have ideas? It looks like something changed that breaks usage of examples between Observable Framework versions - perhaps the addition of rimraf
?
Can you reduce the bug to a minimal reproduction?
Try to replace FileAttachment(x)._url
with either await FileAttachment(x).url()
or FileAttachment(x).href
. Since v1.5.0 this (private) property has been removed, which explains the "undefined".
https://github.com/observablehq/framework/releases/tag/v1.5.0
That was it, thank you for the help @Fil !!! Unblocked on this :) filed a pull request: https://github.com/bdon/observable-framework-maps/pull/3 glad we figured out the breaking change!
I'd also suggest not to close this issue while #3 is still open. In the description of #3 you would write, on a separate line, "closes #2", and GitHub will automatically close this issue when #3 is merged :)
When creating a new repository, the following leads to
source invalid
errors after copying the example markdown file and data dependency from this repository:npm init @observablehq
(select "include sample files" and "npm" and "initialize git repository")This yields the following error:
With the JavaScript console error log:
I tried the following to debug:
I might be missing something basic as it's my first time doing something like this.
package.json
from this: