You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Module imports in scripts work only using absolute file path #5841
Trying to import a module in a standalone script using just the file name fails even though the module is placed in $env.NU_LIB_DIRS directory. The same script works just fine if module is imported using it's full file path
How to reproduce
Create a module that exports a function
Place the module in $env.NU_LIB_DIRS.0
Create a script anywhere beside $env.NU_LIB_DIRS.0
In the script place import statement at the top use modulename.nu *
Try calling one of the exported functions in the script (this fails with module not found error)
Replace the import statement with use full/path/to/module/file/modulename.nu *
Try calling one of the exported functions in the script (this works just fine)
Expected behavior
I expected nu to be able to resolve the module path in a standalone script
Screenshots
No response
Configuration
key
value
version
0.64.0
branch
commit_hash
build_os
linux-x86_64
build_target
x86_64-unknown-linux-gnu
rust_version
rustc 1.61.0 (fe5b13d68 2022-05-18)
cargo_version
cargo 1.61.0 (a028ae4 2022-04-29)
pkg_version
0.64.0
build_time
2022-06-15 09:04:16 +02:00
build_rust_channel
release
features
database, dataframe, default, trash, which, zip
installed_plugins
gstat, inc, query, query json, query web, query xml
Activity