Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Elm 0.19 #275

Closed
accordeiro opened this issue Aug 21, 2018 · 26 comments
Closed

Upgrade to Elm 0.19 #275

accordeiro opened this issue Aug 21, 2018 · 26 comments

Comments

@accordeiro
Copy link

Hi! I'm not sure if this is already being done by someone, but if not I'd love to help upgrading create-elm-app to Elm 0.19 – just let me know. :)

@halfzebra
Copy link
Owner

@xtian have initiated the work on the upgrade.

You are very welcome to join the conversation in #256 if you'd like to help!

@berry
Copy link

berry commented Aug 25, 2018

Just curious. I am using create-elm-app. It helps me a lot in building a JS-Elm-hybrid web-app. I want to port this app to 0.19. Any idea when create-elm-app will support 0.19? Thanks very much in advance.

@halfzebra
Copy link
Owner

Update on 0.19 support

Create Elm App upgrade will be possible when it's dependencies are upgraded to 0.19

The work is being done in:

All of these projects are maintained by the community, so anyone is welcome to help.

Stay tuned! CEA with 0.19 is coming 🙂

@optikfluffel
Copy link
Contributor

All three of them are merged and released now. 😁

@halfzebra
Copy link
Owner

Waiting for xtian#1, I think the next major release for Create lm App is happening this weekend.

@halfzebra
Copy link
Owner

halfzebra commented Aug 30, 2018

Create Elm App with Elm 0.19 and Webpack 4 is available at npm install create-elm-app@next

screen shot 2018-08-31 at 00 19 07

Please let me know if you'll experience any issues!

I'll be preparing the release(#272) according to the plan.

@optikfluffel
Copy link
Contributor

I get some fsevents related errors when trying to install using npm install create-elm-app@next -g on the macOS 10.14 Public Beta:

npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
/usr/local/bin/elm-app -> /usr/local/lib/node_modules/create-elm-app/bin/elm-app-cli.js
/usr/local/bin/create-elm-app -> /usr/local/lib/node_modules/create-elm-app/bin/create-elm-app-cli.js

> [email protected] install /usr/local/lib/node_modules/create-elm-app/node_modules/elm-test/node_modules/fsevents
> node install

node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)
  SOLINK_MODULE(target) Release/.node
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:85:
../src/methods.cc:14:12: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  handler->Call(3, argv);
           ^
../../../../nan/nan.h:1646:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../../../nan/nan.h:102:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
In file included from ../fsevents.cc:85:
../src/methods.cc:14:12: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  handler->Call(3, argv);
           ^
../../../../nan/nan.h:1646:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../../../nan/nan.h:102:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
1 warning generated.
1 warning generated.
rm: ./Release/.deps/Release/obj.target/fse/fsevents.o.d.raw: No such file or directory
make: *** [Release/obj.target/fse/fsevents.o] Error 1
  SOLINK_MODULE(target) Release/fse.node
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 18.0.0
gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/create-elm-app/node_modules/elm-test/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" "--module_name=fse" "--module_path=/usr/local/lib/node_modules/create-elm-app/node_modules/elm-test/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64"
gyp ERR! cwd /usr/local/lib/node_modules/create-elm-app/node_modules/elm-test/node_modules/fsevents
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/create-elm-app/node_modules/elm-test/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/usr/local/lib/node_modules/create-elm-app/node_modules/elm-test/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/create-elm-app/node_modules/elm-test/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
node-pre-gyp ERR! System Darwin 18.0.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/create-elm-app/node_modules/elm-test/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/create-elm-app/node_modules/elm-test/node_modules/fsevents
node-pre-gyp ERR! node -v v10.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/create-elm-app/node_modules/elm-test/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/usr/local/lib/node_modules/create-elm-app/node_modules/elm-test/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)
  COPY /usr/local/lib/node_modules/create-elm-app/node_modules/elm-test/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node
  TOUCH Release/obj.target/action_after_build.stamp
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/create-elm-app/node_modules/elm-test/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ [email protected]
updated 1 package in 55.713s

@halfzebra
Copy link
Owner

halfzebra commented Aug 31, 2018

@accordeiro thanks for the feedback! It's a known issue with fsevents/fsevents#229, we just need to raise the awareness in rtfeldman/node-test-runner#264 to get this fixed.

Which version of node are you running?

@optikfluffel
Copy link
Contributor

@halfzebra I'm running v10.9.0, when I use v9.11.2 it seems to work.

@odoe
Copy link

odoe commented Aug 31, 2018

I'm getting an odd error about corrupt binary on Mac OS 10.13.6
node and npm installed via nvm if that matters.
node: 10.9.0
npm: 6.2.0

create-elm-app test-app

Creating test-app project...

Success! Compiled 1 module.
-- CORRUPT BINARY - /Users/<user>/.elm/0.19.0/package/elm/browser/1.0.0/objs.dat

The binary data at
/Users/<user>/.elm/0.19.0/package/elm/browser/1.0.0/objs.dat is corrupt.

I have Elm 0.19.0 installed via the Mac installer.

Thanks!

@kwonoh
Copy link

kwonoh commented Aug 31, 2018

@odoe
I had the same error message.
The error message is disappeared by deleting the ~/.elm and <project>/elm-stuff directories and rebuild the project by elm-app build.
Surprisingly, once I did this, creating a new project did not give me the error message.

@mbylstra
Copy link

mbylstra commented Sep 1, 2018

@kwonoh's fix worked for me (thanks!). I also find that after doing this creating a new project does not give the error message. However, if I then remove ~/.elm and create a new project, I get the CORRUPT BINARY error message again.

@jtrunick
Copy link

jtrunick commented Sep 1, 2018

I'm continually getting this for anything i click on or do in my app:
RangeError: Maximum call stack size exceeded
Doing a build, the app works as expected.

@berry
Copy link

berry commented Sep 1, 2018

Hi, I installed npm install create-elm-app@next. Should Hot Module Replacement (HMR) work? Because, on my Macbook (Safari and Firefox) it does not work. Only after a browser refresh code changes are visible.

@halfzebra
Copy link
Owner

halfzebra commented Sep 2, 2018

@optikfluffel I suspect rtfeldman/node-test-runner#264 will fix the problem.

@jtrunick Thanks for the feedback, but I can't do anything about this without reproducible example. 🙁

My best guess would be that this error might be caused by DevTools if large amounts of data stored in the model(this has been a bug since 0.18 in DevTools). Please try Turning off Elm Debugger, if this doesn't help, I'll need an example to debug it.

@berry thanks for the feedback and again, I can't do much without looking at the setup.

Does your app have a router? If yes, this could be related to the fact that in 0.19 HMR will not work if you don't store the key returned by the router at the root of your model(check browsers console for a more detailed hint).

There's also a very rare bug, where HMR would not work on modules that are imported after {- -} comment, but this has been the problem since 0.18

Are there any errors in the browser's console?

Please let me know if, you'll have any info. I'll be happy to help 🙂

@berry
Copy link

berry commented Sep 2, 2018

@halfzebra I do not know what happened in my code, but now HMR does work. My apologies. I do have a router in my app and yes the key is stored in the root of my model. Before, when I did not see HMR working I did not see any errors in the browser console. The [elm-hot] Enabled was there and whenever I updated code, nothing happened, no errors mentioned.

Now, today, I do the same thing and HMR says [elm-hot] Hot-swapping module: Main in the browser console. So, HMR works perfectly.

I am sorry but I have no idea what has changed in my code that caused HMR to stop working or to get is going again. I am just happy it does work now. Thank you for your patience and help.

@halfzebra
Copy link
Owner

@berry Good news, thanks for letting me know!

@bazzargh
Copy link
Contributor

bazzargh commented Sep 2, 2018

@mbylstra I see the same problem (ie, using elm-app create foo complains that ~/.elm/0.19.0/package/elm/browser/1.0.0/objs.dat is corrupt, even after ~/.elm is deleted.). However, you can work around it easily: cd foo (the newly created project), rm -rf elm-stuff, then elm-app build. Subsequent elm-app create blah invocations work as expected; it appears that the corruption message is really complaining about it being missing, and recreating it with an elm-app build fixes things.

@bazzargh
Copy link
Contributor

bazzargh commented Sep 2, 2018

@halfzebra ... I've traced down the bug above. It's because the template dir contains elm-stuff - it shouldn't? That gets copied into the created project, when it's there and ~/.elm is missing, you get an error. template/elm-stuff clearly isn't in git, but it's there in https://registry.npmjs.org/create-elm-app/-/create-elm-app-2.0.0-rc2.tgz - seems to be a packaging error?

Recreated by doing a clean install of npm install -g create-elm-app@next, then rm -rf foo ~/.elm; elm-app create foo

bazzargh added a commit to bazzargh/create-elm-app that referenced this issue Sep 3, 2018
`.gitignore` was ignoring some items under template that still appeared in the packaged releases,
because `template` was explicitly included in package.json, and that overrides those ignores.

Adding explicit exclusions for the build products under `template` to `package.json` prevents
packaging errors.

I've added `template/elm-stuff` and `template/index.html` to `.gitignore` too, because those
are created if `elm make src/Main.elm` is run in `template`, which seems to have been the cause.

re halfzebra#275
@halfzebra
Copy link
Owner

halfzebra commented Sep 3, 2018

The updated version can be installed using npm install -g create-elm-app@next 🎉

The official release most-likely will happen today if nothing else pops up.

@Dauhel
Copy link

Dauhel commented Sep 3, 2018

i get the error when i run create-elm-app myProject

"-bash: create-elm-app: command not found"

@ehamberg
Copy link

ehamberg commented Sep 3, 2018

@Dauhel The binary is called elm-app.

@Dauhel
Copy link

Dauhel commented Sep 3, 2018

@ehamberg please can you be more explicit?
elm-app give the same error "-bash: elm-app: command not found"

@simerlec
Copy link

simerlec commented Sep 3, 2018

@Dauhel would you be so kind to open another issue for your problem to keep this thread on the original topic?

@Dauhel
Copy link

Dauhel commented Sep 3, 2018

ok @simerlec

@halfzebra
Copy link
Owner

Create Elm App v2 was released! 🎉

Please create new issues if you are experiencing any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests