CryptoRand / Elixir

Fast and efficient cryptographically strong versions of several Enum functions that rely on :rand uniform functions for randomness.
MIT License
3 stars 1 forks source link

Cannot Properly Load Module on Windows #2

Open packetlost opened 6 months ago

packetlost commented 6 months ago

Cannot properly load module in windows

Error: PS C:\Users\XXXX\d1000_app> mix deps.get

mix compile iex -S mix

(ArgumentError) cannot invoke def/2 outside module (elixir 1.16.1) lib/kernel.ex:6555: Kernel.assert_module_scope/3 (elixir 1.16.1) lib/kernel.ex:5179: Kernel.define/4 (elixir 1.16.1) expanding macro: Kernel.def/2 mix.exs:1: (file) (ArgumentError) cannot invoke def/2 outside module (elixir 1.16.1) lib/kernel.ex:6555: Kernel.assert_module_scope/3 (elixir 1.16.1) lib/kernel.ex:5179: Kernel.define/4 (elixir 1.16.1) expanding macro: Kernel.def/2 mix.exs:1: (file) Invoke-Expression : A parameter cannot be found that matches parameter name 'S'. At line:3 char:5

  • iex -S mix
  • ~~
  • CategoryInfo : InvalidArgument: (:) [Invoke-Expression], ParameterBindingException
  • FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.InvokeExpressionCommand

We have gone round and round trying to force this to work. Even ChatGPT cannot tell us what the problem is. Just an ultra basic implementation of a d1000 app trying to test Cryptorand out... and it just will not work for us.

packetlost commented 6 months ago

This module only works for us if we include the entire codebase directly in our app. Regular Import does not work. Absolute filepath does not work. Including the git link does not work. Tried calling both your package and tried calling our fork of it. We literally have to copy paste all the code in our module.

Very strange, unsure what is happening.