Giter VIP home page Giter VIP logo

elm-pages-starter's People

Contributors

avh4 avatar dillonkearns avatar lydell avatar sparksp avatar spaxe avatar vviktorpl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

elm-pages-starter's Issues

Runtime error when blog author is not in Author.elm

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?

Starter replaced by `npx elm-pages@latest init my-app`?

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

running npm install does not run the postinstall script

Steps to Reproduce

  1. clone elm-pages-starter
  2. run npm install
  3. notice that the post-install script does not run

Configuration

I'm running on macOS Big Sur 11.1 on Apple Silicon (M1).

Fix

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"
  }
}

Error compiling starter

Gday,

elm-pages looks pretty awesome so I thought I would try it out.

I followed the instructions in README and cloned the repo, npm install, then npm start and I get the following error. Not sure how to fix as it is in a generated file?

error

npm install failed

Hi!
elm-pages looks really good! when I try it out, I faced issue.
detail is below.

Versions

macOS Big Sur 11.4

  • Node Version: v16.4.1
  • NPM Version: 7.19.1

Description

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

Invalid package dependencies on npm start

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.

Error running `npm install`

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

2022-12-22T14_24_36_294Z-debug-0.log

Please include focus styles by default

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.

Building takes forever and fails with 95% emittingnpm ERR! code ELIFECYCLE

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?

package updates needed

There are a few packages in package.json and elm.json that need updating:

In package.json

  • "elm-pages": "1.4.3" // was "1.4.0"
  • "highlight.js": "???" // is "9.15.10" but this is very old - should it be upgraded to "9.18.x" or "10.2.x"?
  • "elm-format": "elm0.19.1" // was "0.8.2"; this will install "0.8.3"

In elm.json

  • "dillonkearns/elm-markdown": "5.0.0" // is "4.0.2"
  • "dillonkearns/elm-pages": "6.0.0" // is "5.0.1"
  • "justinmimbs/date": "3.2.1" // is "3.2.0"
  • "mdgriffith/elm-ui": "1.1.8" // is "1.1.6"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.