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

Development instructions don't work as written #852

Open
Jaculabilis opened this issue Nov 12, 2024 · 1 comment
Open

Development instructions don't work as written #852

Jaculabilis opened this issue Nov 12, 2024 · 1 comment

Comments

@Jaculabilis
Copy link

Jaculabilis commented Nov 12, 2024

When I check out the repository and attempt to run the dev server according to the instructions, I get an error that babel-loader isn't found.

$ env --chdir=frontend nix develop -c yarn dev
path '/home/tvb/projects/nixos-search/frontend' does not contain a 'flake.nix', searching up
warning: ignoring untrusted substituter 'https://nixos-search.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
warning: ignoring untrusted substituter 'https://nixos-search.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
yarn run v1.22.22
$ webpack serve --port 3000 --config config/webpack.dev.js
<i> [webpack-dev-server] [HPM] Proxy created: /backend  -> https://nixos-search-7-1733963800.us-east-1.bonsaisearch.net/
<i> [webpack-dev-server] [HPM] Proxy rewrite rule created: "^/backend" ~> ""
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:3000/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.1.185:3000/
<i> [webpack-dev-server] Content not from webpack is served from '/home/tvb/projects/nixos-search/frontend/src/assets' directory
<i> [webpack-dev-server] 404s will fallback to '/index.html'
ERROR in main
Module not found: Error: Can't resolve 'babel-loader' in '/home/tvb/projects/nixos-search/frontend'

webpack compiled with 1 error

I still get the error if I cd frontend and nix develop -c yarn dev, if I enter the devshell and yarn dev manually, or if I direnv allow and run yarn dev that way.

I am using Nix 2.18.4.


While inside the devshell, I can run yarn install to generate a yarn.lock and node_modules, and yarn dev works after this. I assume this yarn install is intended, so the README can probably be updated to include that. Should the yarn.lock be committed to git? If not, should a .gitignore rule be added to make that decision explicit?

@Jaculabilis Jaculabilis changed the title Development instructions don't work Development instructions don't work as written Nov 12, 2024
@loprima-l
Copy link

I've been trough the same issue even on NixOS it's not working.

Fixing the README sound great to me for the short term but we'll need to fix the nix shell later.

I'm willing to do it if you want but as I've opened a rewrite Issue,I'm waiting for it to see when I'm going to do it.

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