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

Error when trying to run Sample Miso-JSaddle application #775

Open
panmona opened this issue Feb 21, 2025 · 2 comments
Open

Error when trying to run Sample Miso-JSaddle application #775

panmona opened this issue Feb 21, 2025 · 2 comments

Comments

@panmona
Copy link

panmona commented Feb 21, 2025

Describe the bug
I'm just getting started with miso.
And I tried running the sample jsaddle application which results into the following error for me:

error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:37:12:
           36|
           37|   strict = derivationStrict drvAttrs;
             |            ^
           38|

       … while evaluating derivation 'ghc-shell-for-app-0.1.0.0'
         whose name attribute is located at /nix/store/9r1vhvri4ba913g4vyg5jqrhg6pb9amn-source/pkgs/development/haskell-modules/make-package-set.nix:308:9

       … while evaluating attribute 'NIX_GHC' of derivation 'ghc-shell-for-app-0.1.0.0'
         at /nix/store/9r1vhvri4ba913g4vyg5jqrhg6pb9amn-source/pkgs/development/haskell-modules/make-package-set.nix:316:9:
          315|         LOCALE_ARCHIVE = pkgs.lib.optionalString (stdenv.hostPlatform.libc == "glibc") "${buildPackages.glibcLocales}/lib/locale/locale-archive";
          316|         "NIX_${ghcCommandCaps}" = "${ghcEnv}/bin/${ghcCommand}";
             |         ^
          317|         "NIX_${ghcCommandCaps}PKG" = "${ghcEnv}/bin/${ghcCommand}-pkg";

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: undefined variable 'miso'
       at /home/m/Dev/study/Sem8/BA/miso/sample-app-jsaddle/default.nix:5:72:
            4| {
            5|   dev = pkgs.haskell.packages.ghc865.callCabal2nix "app" ./. { inherit miso; };
             |                                                                        ^
            6|   release = pkgs.haskell.packages.ghcjs86.callCabal2nix "app" ./. {};

The normal sample-app worked for me: https://github.com/dmjio/miso/tree/master?tab=readme-ov-file#begin, but I'd like to try out the live-reloading feature as otherwise the development experience is a lot less nice.
Do you know what could be the error here? I'm completely new to miso and nix, so I don't quite know where to begin in solving this error with the sample app. Even just pointers into the right direction would be appreciated! Thank you!

To Reproduce
This is what I did, though it might not be easily reproducible with these steps:

  1. Started with no nix installed
  2. install nix with the install link from here: https://nix.dev/install-nix.html.
  3. Build the normal sample-app with nix (including the cachix steps) https://github.com/dmjio/miso/tree/master?tab=readme-ov-file#begin
  4. Try to build the jsaddle sample app using nix-shell --run reload

Expected behavior
The build runs successfully

Screenshots

Desktop (please complete the following information):

  • OS: Linux
  • Browser: n.a.
  • Version: n.a.

Additional context

@panmona panmona changed the title Error when trying to run Sample Miso-JSaddle Error when trying to run Sample Miso-JSaddle application Feb 21, 2025
@dmjio
Copy link
Owner

dmjio commented Feb 21, 2025

#776

@panmona
Copy link
Author

panmona commented Feb 22, 2025

Thank you for taking such a quick look at this issue!
I pulled all new changes and tried it again. The error I reported is gone. Thanks :)

I now unfortunately have a new error though: Parse of field 'packages' failed:

Loading /nix/store/mn8w5874m8xh8ssk141knyc3g57byk3y-cabal-install-2.4.1.0/bin/cabal new-repl ...
Warning: /home/m/.cabal/config: Unrecognized stanza on line 146
/home/m/.cabal/config: Unrecognized field installdir on line 120
Warning: /home/m/.cabal/config: Unrecognized stanza on line 146
/home/m/.cabal/config: Unrecognized field installdir on line 120
cabal: Error parsing project file
/home/m/Dev/study/Sem8/BA/miso/cabal.project:1:
Parse of field 'packages' failed.

Command "/nix/store/mn8w5874m8xh8ssk141knyc3g57byk3y-cabal-install-2.4.1.0/bin/cabal new-repl" exited unexpectedly

I did not do any changes to my cabal config file in my home directory. Just to make sure I deleted it and re-created it with cabal user-config update. I received the same output afterwards.

Do you have an idea on how this error can be resolved?

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

2 participants