halfzebra / create-elm-app Goto Github PK
View Code? Open in Web Editor NEW๐ Create Elm apps with zero configuration
License: MIT License
๐ Create Elm apps with zero configuration
License: MIT License
I want to be able to deploy apps, but unfortunately I don't have that much experience with making build-packs.
There is a pretty cool project HappyAndHarmless/heroku-buildpack-elm, let's see if it's possible to have the setup for deployment on Heroku in template.
Hi!
First, this is an awesome tool, thanks a lot โค๏ธ
Given this uses webpack it is very easy to use browser libraries in the JS files.
Maybe it would be useful to show how to use npm libraries for your JS code:
Example:
# Add package.json
npm init -y
# Install library from npm
npm install --save-dev xtend
# Use xtend in your JS code
var xtend = require('xtend')
console.log(
xtend({a: 1}, {b: 2}, {a: 3, c: 4})
)
Maybe after https://github.com/halfzebra/create-elm-app/blob/master/template/README.md#installing-elm-packages in a section titled Installing npm JS libraries
Would you be interested in a PR?
Thanks again for your work on this.
Add eeue56/elm-html-test for testing view testing.
Provide guidelines or examples for testing view functions.
How can I change elm-app start
default port value?
(:3000 is already occupied with another service, so I can't run my Elm app.)
When elm-app start
fails to compile, you'll get a list of warnings and errors, but when it succeeds, the warnings does not show.
It would be helpful to show the warnings along with the "compiled successfully" screen, as they often contain some useful information.
It's in beta but very stable - I've used it on numerous projects and not had issues; and it's not a huge amount of change.
Would you be happy with a PR if I found the time to make it? :)
Just updated create-elm-app
tool, and found that after building, resulting dist
folder does not contain one of two images.
For some reasons, it just stopped adding logo.png
in my build:
Hash: a04a29783dd15daf70f6
Version: webpack 1.14.0
Time: 9928ms
Asset Size Chunks Chunk Names
static/media/about.6c5ea71c.png 14 kB [emitted]
js/main.81a8a9e3.js 271 kB 0 [emitted] main
css/main.bfc7ed41.css 154 kB 0 [emitted] main
favicon.ico 521 bytes [emitted]
index.html 1.16 kB [emitted]
This is my project: https://github.com/hel-repo/hel-face
And this is how my images are attached to the project:
<...>
require('./Images/about.png');
require('./Images/logo.png');
var Elm = require('./Main.elm');
var root = document.getElementById('root');
Elm.Main.embed(root);
(https://github.com/hel-repo/hel-face/blob/master/src/index.js)
Everything works okay on 0.2.1
:
Hash: 26a581f82038620448fb
Version: webpack 1.13.3
Time: 16834ms
Asset Size Chunks Chunk Names
static/media/about.6c5ea71c.png 14 kB [emitted]
static/media/logo.7c5853e0.png 8.59 kB [emitted]
js/main.562a2cfd.js 259 kB 0 [emitted] main
css/main.bfc7ed41.css 154 kB 0 [emitted] main
Compiled successfully!
Would be a really useful command to add. I'd love to take a stab at it if you're open to the idea?
Maybe? I tend to like my boilerplates to do a "First commit from create-elm-app" git commit so a repo is all set up for me, but that might just be because I'm lazy!
Right now if you do fresh installation of the package, it does not work.
npm rm -g create-elm-app
npm i -g create-elm-app
elm-app create test
cd test
elm-app start
$ elm-app start
/Users/fnez/.nvm/versions/node/v4.5.0/lib/node_modules/create-elm-app/bin/elm-app-cli.js:29
if (pathExists.sync('elm-package.json') === false) {
^
ReferenceError: pathExists is not defined
at Object.<anonymous> (/Users/fnez/.nvm/versions/node/v4.5.0/lib/node_modules/create-elm-app/bin/elm-app-cli.js:29:9)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:974:3
Very cool project, I'm excited to use it!
But having trouble using it on a Mac...
create-elm-app app
env: node\r: No such file or directory
Looked like a line ending issue...
Fixed the line endings in the CLI file:
dos2unix create-elm-app-cli.js
dos2unix: converting file create-elm-app-cli.js to Unix format...
And that seemed to do the trick:
โ create-elm-app app2
Creating app2 project...
Starting downloads...
โ elm-lang/virtual-dom 1.1.1
โ elm-lang/html 1.1.0
โ elm-lang/core 4.0.5
Packages configured successfully!
Project is successfully created in `/Users/tritowntim/code/tmp/app2`.
I would submit a PR, but can't get git to recognize the new file endings.
I am having getting this error when trying to create a new app with create-elm-app
sujaira@sujaira-desktop:~/test-job/elm-test$ create-elm-app my-app
Creating my-app project...
Failed to install elm packages
Please, make sure you have internet connection!
In case if you are running Unix OS, you might look in to this issue:
https://github.com/halfzebra/create-elm-app/issues/10
but I don't have any problem with my internet connection.
I run elm-package install in my-app folder and after installing the packages I run elm-app start but I am getting this error
Failed to compile.
Error in ./src/Main.elm
Module build failed: Error: Compiler process exited with error Compilation failed
events.js:154
throw er; // Unhandled 'error' event
^
Error: spawn /usr/local/lib/node_modules/create-elm-app/node_modules/elm/Elm-Platform/0.18.0/.cabal-sandbox/bin/elm-make ENOENT
@ ./src/index.js 3:10-31
what could be causing this errors ?
I changed the example code to the following, click Add 1 a few times and then made a change to force a compile error, and then corrected it. State returned to 1
module App exposing (..)
import Html exposing (Html, text, div, img, button)
import Html.Attributes exposing (src)
import Html.Events exposing (..)
type alias Model =
{ message : String
, logo : String
, count : Int
}
init : String -> ( Model, Cmd Msg )
init path =
( { message = "Your Elm App is working!", logo = path, count = 1 }, Cmd.none )
type Msg
= Inc
| NoOp
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
Inc ->
{ model | count = model.count + 1 } ! []
_ ->
model ! []
view : Model -> Html Msg
view model =
div []
[ img [ src model.logo ] []
, div [] [ text model.message ]
, div [] [ text <| toString model.count ]
, button [ onClick Inc ] [ text "add 1" ]
]
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.none
We could use elm-test to set up some basic testing by default. WDYT? I'm happy to work on a PR if you like the idea :)
Currently, elm-app build
command always returns zero code, even if the build was failed.
Like here.
It may be very helpful for auto-deploy configuration, if it will return non-zero code when fails.
As a user, who want's to eject
, I would like to have more information in webpack.config
files
Add comments, describing configuration code.
Got these when installing on Windows 10 x64:
npm WARN optional Skipping failed optional dependency /create-elm-app/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
Is 'fsevents' really optional? Do I lose any functionality?
I presume this is a Windows platform issue, there prolly should be something in the docs to warn folks about this.
Any chance you could add out-of-the-box SASS support?
Packages required:
Webpack config:
{
test: /\.sass$/,
loader: "style!css!sass?indentedSyntax"
}
It looks like environment variables are not being picked up by webpack in version 0.2.2
. This feature has been recently added, closely following the implementation of the identical create-react-app
feature: 55cff7d.
create-elm-app testapp
cd testapp
touch .env
TESTVAR=somevalue
to .env
console.log(process.env.TESTVAR);
in ./src/index.js
elm-app start
This is supposed to log 'somevalue', but instead logs undefined
.
Terminal on MacOS is not being cleared.
Currently it uses:
function clear () {
console.log('\x1Bc');
}
There must be a better way to do this.
Not have written a letter, a fresh install gives a compiler error for test:
-- TYPE MISMATCH ------------------------------------------------- .\.\Tests.elm
The argument to function `first` is causing a mismatch.
14| Tuple.first App.init
^^^^^^^^
Function `first` is expecting the argument to be:
( App.Model, Cmd App.Msg )
But it is:
String -> ( App.Model, Cmd App.Msg )
Hint: It looks like a function needs 1 more argument.
Detected errors in 1 module.
Compilation failed for Main.elm
Is there anything I did wrong?
Hi there,
I've just run
npm install -g create-elm-app
create-elm-app my-app
cd my-app
elm-app start
And I'm keep getting following:
Failed to compile.
Error in ./src/Main.elm
Module build failed: Error: Compiler process exited with error Compilation failed
elm-make: Map.!: given key is not an element in the map
@ ./src/index.js 3:10-31
Repeating steps above didn't help
Url loader enables us to encode small files in base64
It would be nice to have a simple workflow for publishing an app with gh-pages
Maybe this could be automated as a script for elm-app
.
I would like to be able to run the development server with Proxy
Probably this configuration should go in to elm-package.json
Hi
I just read about the tool in the elm-lang slack and wanted to try it out.
I followed the instructions and got the output below. I am on Linux Mint.
Let me know, if you need any more info, can't wait to try this out, have heard great things only.
Thank you!
mb@rock ~/code/elm $ uname -a
Linux rock 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
mb@rock ~/code/elm $ node -v
v6.3.0
mb@rock ~/code/elm $ sudo npm install create-elm-app -g
npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
/usr/local/bin/elm-app -> /usr/local/lib/node_modules/create-elm-app/bin/global-cli.js
/usr/local/bin/create-elm-app -> /usr/local/lib/node_modules/create-elm-app/bin/create-elm-app-cli.js
npm WARN lifecycle [email protected]~install: cannot run in wd %s %s (wd=%s) [email protected] node install.js /usr/local/lib/node_modules/create-elm-app/node_modules/elm
/usr/local/lib
โโโฌ [email protected]
โโโฌ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โโโ [email protected]
โโโฌ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโฌ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โโโ [email protected]
โโโฌ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โโโ [email protected]
โโโฌ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โโโ [email protected]
โโโฌ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โ โโโฌ [email protected]
โ โ โ โ โ โโโฌ [email protected]
โ โ โ โ โ โโโ [email protected]
โ โ โ โ โ โโโ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โโโ [email protected]
โโโ [email protected]
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected]
โโโ [email protected]
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โโโฌ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โโโ [email protected]
โโโฌ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโฌ [email protected]
โ โ โ โ โ โโโ [email protected]
โ โ โ โ โ โโโ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โโโ [email protected]
โโโฌ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โโโ [email protected]
โโโฌ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected]
โโโ [email protected]
โโโฌ [email protected]
โโโ [email protected]
npm WARN optional Skipping failed optional dependency /create-elm-app/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
mb@rock ~/code/elm $ create-elm-app myapp
Creating myapp project...
Failed to install elm packages
Please, make sure you have internet connection!
In case if you are running Unix OS, you might look in to this issue:
https://github.com/halfzebra/create-elm-app/issues/10
Since now we have automated semantic release, it would be great to establish some guidelines for contributing.
If you work with elm-lang/navigation or any similar tools, going to localhost:3000/foo
will break as Webpack dev server tries to serve that file.
If we set historyApiFallback: true
as an option when booting the dev server, this works as expected. I think this makes a sensible default - or at the least I'd love to be able to configure it without having to eject.
WDYT?
I got the following when doing sudo npm update -g create-elm-app
.
Moving the file as suggested solved it, tho.
23960 verbose stack Error: Refusing to delete /usr/local/bin/elm-app: ../lib/node_modules/create-elm-app/bin/global-cli.js symlink target is not controlled by npm /usr/local
23960 verbose stack at clobberFail (/usr/share/npm/lib/utils/gently-rm.js:162:12)
23960 verbose stack at isSafeToRm (/usr/share/npm/lib/utils/gently-rm.js:152:15)
23960 verbose stack at /usr/share/npm/lib/utils/gently-rm.js:93:5
23960 verbose stack at LOOP (/usr/share/npm/node_modules/slide/lib/chain.js:7:26)
23960 verbose stack at /usr/share/npm/node_modules/slide/lib/chain.js:18:7
23960 verbose stack at skipENOENT (/usr/share/npm/lib/utils/gently-rm.js:174:38)
23960 verbose stack at /usr/share/npm/node_modules/iferr/index.js:11:16
23960 verbose stack at /usr/share/npm/node_modules/iferr/index.js:11:16
23960 verbose stack at /usr/share/npm/node_modules/iferr/index.js:11:16
23960 verbose stack at /usr/share/npm/node_modules/iferr/index.js:11:16
23961 verbose cwd /home/mb/code/elm
23962 error Linux 4.4.0-45-generic
23963 error argv "/usr/bin/nodejs" "/usr/bin/npm" "update" "-g" "create-elm-app"
23964 error node v4.2.6
23965 error npm v3.5.2
23966 error path /usr/local/bin/elm-app
23967 error code EEXIST
23968 error Refusing to delete /usr/local/bin/elm-app: ../lib/node_modules/create-elm-app/bin/global-cli.js symlink target is not controlled by npm /usr/local
23969 error File exists: /usr/local/bin/elm-app
23970 error Move it away, and try again.
23971 verbose exit [ 1, true ]
So, I am trying Elm first time, everything is latest version as of today. I even thought to do npm install of elm-test -g. I am on Win 10 (sorry) node 6.9.1, have not made any changes after cloning from git.
C:\elm\app1>elm-app test
I cannot find module 'Tuple'.Module 'Lazy.List' is trying to import it.
Potential problems could be:
- Misspelled the module name
- Need to add a source directory or new dependency to elm-package.json
Compilation failed for Main.elm
Thanks for making this; sorry I don't know enough to fix it myself
We need to make sure, that this module:
If I recall correctly, elm-app test
worked fine in previous version (with Elm 0.17, create-elm-app 0.1.10).
I upgraded to Elm 0.18.0 and create-elm-app 0.2.0 -- I'm somewhat new to the Elm ecosystem and create-elm-app, so I'm not sure if I've messed up something somewhere.
user@machine:~/elmstuff$ elm-app create test
[snip]
Project is successfully created in `/home/testuser/elmstuff/test`.
[snip]
testuser@machine:~/elmstuff$ cd test
testuser@machine:~/elmstuff/test$ elm-app test
I cannot find module 'Tuple'.
Module 'Lazy.List' is trying to import it.
Potential problems could be:
* Misspelled the module name
* Need to add a source directory or new dependency to elm-package.json
Compilation failed for Main.elm
Versions:
Thank you for this tool!
Currently the tool generates most basic Hello World
program, that does not follow the Elm Architecture.
It would be great to have on option(s) to generate a skeleton for Html.App.beginnerProgram
as well as Html.App.program
as a starting point.
The following examples can be used:
https://guide.elm-lang.org/architecture/user_input/buttons.html
https://guide.elm-lang.org/architecture/effects/http.html (The Bare Minimum)
.header-container {
background:url("./images/barre-grise.png") repeat-x 0 0;
}
Adding this in main.css throws this error :
~/K/l/licence-elm-client (test-elm) $ elm-app start
Running /usr/local/lib/node_modules/create-elm-app/node_modules/.bin/elm-make /Users/toto/licence/licence-elm-client/src/Main.elm --yes --warn --output /var/folders/vj/sl_9sk296rq4
st_49brcbbf80000gn/T/116825-19365-119ploe.js
Success! Compiled 1 module.
Successfully generated /var/folders/vj/sl_9sk296rq4st_49brcbbf80000gn/T/116825-19365-119ploe.js
Compilation failed.
./src/images/barre-grise.png
Module parse failed: /Users/toto/licence/licence-elm-client/src/images/barre-grise.png Unexpected character '๏ฟฝ' (1:0)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '๏ฟฝ' (1:0)
at Parser.pp$4.raise (/usr/local/lib/node_modules/create-elm-app/node_modules/webpack/node_modules/acorn/dist/acorn.js:2221:15)
The User Guide must give practical advice on:
Right now most of tests depends on result of 'Create Elm application with
create-elm-app command'
suite. It is very uncomfortable to run separate test.
Can make a PR for it.
I'm using Ubuntu 14.04.
I do 'sudo npm install create-elm-app -g' and get 'Project is successfully created in /home/alan/jack
.'
I do 'cd jack' and then 'elm-app start' and get following terminal message....
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::3000
at Object.exports._errnoException (util.js:953:11)
at exports._exceptionWithHostPort (util.js:976:20)
at Server._listen2 (net.js:1253:14)
at listen (net.js:1289:10)
at Server.listen (net.js:1385:5)
at Server.listen (/usr/local/lib/node_modules/create-elm-app/node_modules/webpack-dev-server/lib/Server.js:324:27)
at Object. (/usr/local/lib/node_modules/create-elm-app/scripts/start.js:62:11)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Function.Module.runMain (module.js:575:10)
at startup (node.js:160:18)
at node.js:449:3
Local host:3000 gives 'Uncaught ReferenceError: _elm_lang$virtual_dom$VirtualDom$programWithFlags is not defined(โฆ)
Help please.
I recently switched from Win7 to Linux Mint (18) and now keep running into strange errors
Firstly, create-elm-app creates proper folder structure, but doesn't download any packages (nor does it create elm-package.json file)
If I then use elm package install by hand, everything loads as expected. However, on elm-app start (and other commands too) I get following error:
Compilation failed.
./src/Main.elm
Module build failed: Error: Compiler process exited with error Compilation failed
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn /usr/lib/node_modules/create-elm-app/node_modules/elm/Elm-Platform/0.17.1/.cabal-sandbox/bin/elm-make ENOENT
at exports._errnoException (util.js:907:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
at Function.Module.runMain (module.js:443:11)
at startup (node.js:139:18)
at node.js:974:3
at ChildProcess.<anonymous> (/usr/lib/node_modules/create-elm-app/node_modules/elm-webpack-loader/node_modules/node-elm-compiler/index.js:224:27)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:829:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:486:12)
@ ./src/index.js 3:10-31
I noticed that /usr/lib/node_modules/create-elm-app/node_modules/elm folder doesn't actually contain Elm-Platform. I don't know if it's more nodejs+linux than create-elm-app problem. Maybe someone will have an idea how to fix this?
Just for reference
node: 4.6.0
npm: 2.15.9
I often forget that I need to install the dependencies in two places if something that's under test needs the module that I just installed. I wonder if we could include an install command that simply runs elm package install in both locations?
I have globally installed previous version (0.1.6
) of package.
Just have cloned repo with latest source. Have installed all packages.
Trying to run tests via npm test
. Tests failed:
Test command line interface functionality
CLI accessibility
โ `create-elm-app` command should be available (156ms)
โ `elm-app` command should be available (130ms)
โ `elm-app package` command should be available (150ms)
Create Elm application with `create-elm-app` command
โ `create-elm-app test-app` should succeed (1368ms)
โ `test-app` should have elm-package.json file
โ `test-app` should have .gitignore file
1) `test-app` should have the same file structure as template
Building Elm application with `elm-app build`
โ `elm-app build` should succeed in `test-app` (4677ms)
Ejecting Elm application
โ `elm-app eject` should succeed in `test-app` (45405ms)
โ Ejected application should have `package.json` with scripts from Create Elm App
โ Ejected application should have build and start scripts
โ Ejected application should have the config available
โ It should be possible to build ejected applitaction, using npm scripts (7655ms)
In test code I see next line var status = spawn.sync('create-elm-app', [ testAppName ]).status;
It's give me idea that code tries to run globally installed package.
P.S. As I understand, 0.1.6
setups dist
folder by running create-elm-app
command while 0.1.8
doesn't.
Even though the README.md states that there should be generated a elm-package.json, none is generated. It is not present in the /template sub-directory in the create-elm-app repository.
Getting this error when creating an app on Windows 10 x64. The folder 'my-app' definitely did not exist beforehand.
[michael.mrh-laptop] โค create-elm-app my-app
Creating my-app project...
{ Error: EEXIST: file already exists, mkdir 'C:\dev\elm\my-app'
at Error (native)
at Object.fs.mkdirSync (fs.js:922:18)
at Object.mkdirsSync (C:\Users\michael\AppData\Roaming\npm\node_modules\create-elm-app\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:29:9)
at copySync (C:\Users\michael\AppData\Roaming\npm\node_modules\create-elm-app\node_modules\fs-extra\lib\copy-sync\copy-sync.js:31:36)
at C:\Users\michael\AppData\Roaming\npm\node_modules\create-elm-app\node_modules\fs-extra\lib\copy-sync\copy-sync.js:40:7
at Array.forEach (native)
at copySync (C:\Users\michael\AppData\Roaming\npm\node_modules\create-elm-app\node_modules\fs-extra\lib\copy-sync\copy-sync.js:37:14)
at createElmApp (C:\Users\michael\AppData\Roaming\npm\node_modules\create-elm-app\scripts\create.js:30:7)
at Object.<anonymous> (C:\Users\michael\AppData\Roaming\npm\node_modules\create-elm-app\scripts\create.js:18:1)
at Module._compile (module.js:556:32)
errno: -4075,
code: 'EEXIST',
syscall: 'mkdir',
path: 'C:\\dev\\elm\\my-app' }
After installing evancz/url-parser (using elm-app package install), the development build is broken.
elm-app start results in no compiler errors + blank screen in browser.
Inspector gives me the following error:
Uncaught SyntaxError: Invalid or unexpected token
at Object.<anonymous> (bundle.js:1390)
at __webpack_require__ (bundle.js:556)
at fn (bundle.js:87)
at eval (webpack:///./src/index.js?:3)
at Object.<anonymous> (bundle.js:1336)
at __webpack_require__ (bundle.js:556)
at fn (bundle.js:87)
at eval (webpack:///multi_main?:3)
at Object.<anonymous> (bundle.js:589)
at __webpack_require__ (bundle.js:
Have tried deleting elm-stuff and rebuild, but to no avail.
When trying to install as a global dependency with yarn package do not work
$ elm-app --help
module.js:327
throw err;
^
Error: Cannot find module '../node_modules/elm/package.json'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/Users/fnez/.config/yarn/global/node_modules/create-elm-app/bin/elm-app-cli.js:9:28)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
By the command chain:
$ npm i -g create-elm-app
$ create-elm-app tst-elm
$ cd tst-elm
$ elm-app start
I am getting the following error:
Main.elm:3162 Uncaught ReferenceError: _elm_lang$virtual_dom$VirtualDom$programWithFlags is not defined
OS: Windows 10
node: v7.0.0
npm: 3.10.8
Just installed latest 0.1.7
.
Windows 10,
node.js 7.0.0
npm 3.10.8
Created the app and tried to run with elm-app start
.
Got the following exception:
D:\Projects\Elm\my-app>elm-app start
module.js:474
throw err;
^
Error: Cannot find module 'react-dev-utils/webpackHotDevClient'
at Function.Module._resolveFilename (module.js:472:15)
at Function.resolve (internal/module.js:27:19)
at Object.<anonymous> (C:\Users\Me\AppData\Roaming\npm\node_modules\create-elm-app\config\webpack.config.dev.js:13:13)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\Me\AppData\Roaming\npm\node_modules\create-elm-app\scripts\start.js:5:16)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3)
I have checked package.json
and there is no react-dev-utils
listed as a dependency.
Thank you.
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.