dillonkearns / elm-pages-starter Goto Github PK
View Code? Open in Web Editor NEWStarter blog for elm-pages
Home Page: https://elm-pages-starter.netlify.com
Starter blog for elm-pages
Home Page: https://elm-pages-starter.netlify.com
I am just trying out elm-pages. Looks really nice. I thought I'd report a runtime error that I experienced. When elm-pages encounters an author name in the blog that it is not in Author.elm
(I changed it to my name), the site crashes - together with the npm start
development server:
I ran into a problem when parsing the metadata for the page with this path: /blog/draft
Problem with the value at json.author:
"Dillon Kearns"
Couldn't find author with name Dillon Kearns. Options are MMesch
Can this be caught?
Might be a good idea to use/document how to use degit for a nicer starter workflow
As there is a new version of elm-pages that was released in april and the last commit here is from march, I suppose that this is not a starter for v2.
Could it be updated or is it totally replaced by npx elm-pages@latest init my-app
?
running npm install
does not run the postinstall script
npm install
I'm running on macOS Big Sur 11.1 on Apple Silicon (M1).
For "postinstall" to run after an npm install
, it needs to be in the "scripts" object.
package.json
currently is:
{
"name": "elm-pages-example",
"private": true,
"version": "1.0.0",
"scripts": {
"start": "elm-pages develop",
"serve": "npm run build && http-server ./dist -a localhost -p 3000 -c-1",
"build": "elm-pages build"
},
"postinstall": "elm-tooling install",
"dependencies": {
"elm-pages": "^1.5.4"
},
"devDependencies": {
"elm-tooling": "^1.0.0",
"http-server": "^0.12.3"
}
}
package.json
should be:
{
"name": "elm-pages-example",
"private": true,
"version": "1.0.0",
"scripts": {
"start": "elm-pages develop",
"serve": "npm run build && http-server ./dist -a localhost -p 3000 -c-1",
"build": "elm-pages build",
"postinstall": "elm-tooling install"
},
"dependencies": {
"elm-pages": "^1.5.4"
},
"devDependencies": {
"elm-tooling": "^1.0.0",
"http-server": "^0.12.3"
}
}
The ErrorPage template always shows a NotFound
, even when there's an internal error, such as in a BackendTask on a server rendered page.
See
It might make sense to have a gitpod (example here rtfeldman/elm-spa-example#92 ) or a devcontainer (see andys8/elm-spa-example@5e93b24) for this. The later might make more sense, but I might not be aware of all cases, as I haven't really used gitpod yet. Other then trying the demo linked there.
Hi!
elm-pages looks really good! when I try it out, I faced issue.
detail is below.
macOS Big Sur 11.4
I cloned this repository and run npm install
.
It fail with
$ npm install
npm ERR! code 1
npm ERR! path /Users/imairei/Documents/GitHub/sample_elm-pages/node_modules/favicons/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! info sharp Using cached /Users/imairei/.npm/_libvips/libvips-8.8.1-darwin-x64.tar.gz
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: read ENETDOWN
npm ERR! gyp ERR! stack at TLSWrap.onStreamRead (node:internal/stream_base_commons:211:20)
npm ERR! gyp ERR! System Darwin 20.5.0
npm ERR! gyp ERR! command "/Users/imairei/.nodebrew/node/v16.4.1/bin/node" "/Users/imairei/Documents/GitHub/sample_elm-pages/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/imairei/Documents/GitHub/sample_elm-pages/node_modules/favicons/node_modules/sharp
npm ERR! gyp ERR! node -v v16.4.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
Hi! Thanks for a bunch of great elm software! Really looking forward to checking out this one.
I am trying to run the elm-pages-starter according to the instructions on the docs and it seems like there is something off with some of the elm packages, maybe a deprecated package?
I am using MacOS Catalina and node v11.12.0.
Tried to delete and clone it from scratch a couple of times with same result.
I could try to go through each dependency and try to figure out where it lies, but figured I should hear with you first.
➜ npm start
> [email protected] start /Users/lillo/kodefant/elm-tabber/packages/elm-pages-starter
> elm-pages develop
Running elm-pages...
elm-pages DONE
(node:79093) UnhandledPromiseRejectionWarning: Error: Compilation failed
-- INVALID PACKAGE DEPENDENCIES --------------------------------------- elm.json
The dependencies in your elm.json are not compatible.
Did you change them by hand? Try to change it back! It is much better to add
dependencies with elm install or the dependency management tool in elm reactor.
Please ask for help on the Elm slack <http://elmlang.herokuapp.com/> if you try
those paths and still cannot figure it out!
at ChildProcess.<anonymous> (/Users/lillo/kodefant/elm-tabber/packages/elm-pages-starter/node_modules/node-elm-compiler/dist/index.js:131:35)
at ChildProcess.emit (events.js:197:13)
at maybeClose (internal/child_process.js:988:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
(node:79093) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:79093) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
elm-pages-starter/src/DocumentSvg.elm
Lines 58 to 60 in d5e1d8a
NPM v8.16.0
Node v18.7.0
MacBook Pro 13" 2022 (ARM64, M2 Processor)
I get the following error when running npm install
:
npm ERR! code 1
npm ERR! path /Users/frankmayer/Documents/Git/personal-website/node_modules/sharp
npm ERR! command failed
npm ERR! command sh /var/folders/80/_rnh3dk57bs66syjpvl1y5rc0000gn/T/install-ada2e7c5.sh
npm ERR! info sharp Using cached /Users/frankmayer/.npm/_libvips/libvips-8.9.1-darwin-x64.tar.gz
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: /opt/homebrew/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "<string>", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:410:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
npm ERR! gyp ERR! stack at Socket.<anonymous> (node:internal/child_process:449:11)
npm ERR! gyp ERR! stack at Socket.emit (node:events:513:28)
npm ERR! gyp ERR! stack at Pipe.<anonymous> (node:net:757:14)
npm ERR! gyp ERR! System Darwin 22.1.0
npm ERR! gyp ERR! command "/Users/frankmayer/.nvm/versions/node/v18.7.0/bin/node" "/Users/frankmayer/Documents/Git/personal-website/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/frankmayer/Documents/Git/personal-website/node_modules/sharp
npm ERR! gyp ERR! node -v v18.7.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/frankmayer/.npm/_logs/2022-12-22T14_24_36_294Z-debug-0.log
Hi!
I've been reading through the source and the blog post on elm-pages.
I noticed while doing so that focus styles are missing.
I feel a bit frustrated by that, because I would like this project to have accessible defaults, and that it is important to have a solid basis if the community centralises on it.
If I understand correctly, elm-ui
has layoutWith and FocusStyle to include focus styles.
Would it be possible to include the focus by default? Please let me know if I'm missing something, or you would like any more information.
You can find more about focus styles on the Web Content Accessibility Guidelines. There is also a post by Hidde de Vries on Mozilla Hacks about focus.
First of all I'm not a 100% sure how to start a production build, couldn't find docs to that effect. But after looking at the package.json, I tried 'npm run build' and it runs for a really long time, fetching stuff, and elm making three times (about 20 minutes I guess), and then it fails:
`stefan@xpsgiraffeguix ~/elm-pages-starter$ npm run build
[email protected] build /home/stefan/elm-pages-starter
elm-pages build
Dependencies ready!
Success! Compiled 12 modules.
Main ───> /tmp/2021020-11200-2q3n7y.8hgjb.js
Fetching https://cbeci.org/api/csv
Fetching https://api.blockchain.info/charts/total-bitcoins?timespan=100years&format=csv&cors=true
Dependencies ready!
Success! Compiled 12 modules.
Main ───> /tmp/2021020-11200-i1flf6.f11pa.js
Dependencies ready!
Success! Compiled 12 modules.
Main ───> /tmp/2021020-11200-1lz326e.bz0kf.js
95% emittingnpm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: elm-pages build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/stefan/.npm/_logs/2021-01-20T04_04_01_987Z-debug.log`
In develop mode, every reload took forever and the page is extremely slow on this project since I started including StaticHttp Requests. Any ideas?
There are a few packages in package.json and elm.json that need updating:
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.