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: Engine directory could not be created #152

Closed
dertuxmalwieder opened this issue Jan 29, 2022 · 8 comments
Closed

Error: Engine directory could not be created #152

dertuxmalwieder opened this issue Jan 29, 2022 · 8 comments

Comments

@dertuxmalwieder
Copy link

Trying to run tinysearch on Windows 11 (with a Hugo blog):

> tinysearch.exe .\public\index.json
Unpacking tinysearch WASM engine into temporary directory "C:\\Users\\stop_\\AppData\\Local\\Temp\\.tmpZx9gHh"
Starting unpack
Name: \\?\C:\Users\stop_\(redacted)\blog\.git
Name: \\?\C:\Users\stop_\(redacted)\blog\.gitmodules
Name: \\?\C:\Users\stop_\(redacted)\blog\.hugo_build.lock
Name: \\?\C:\Users\stop_\(redacted)\blog\archetypes
Name: \\?\C:\Users\stop_\(redacted)\blog\config.toml
Name: \\?\C:\Users\stop_\(redacted)\blog\content
Name: \\?\C:\Users\stop_\(redacted)\blog\data
Name: \\?\C:\Users\stop_\(redacted)\blog\go.mod
Name: \\?\C:\Users\stop_\(redacted)\blog\go.sum
Name: \\?\C:\Users\stop_\(redacted)\blog\layouts
Name: \\?\C:\Users\stop_\(redacted)\blog\public
Name: \\?\C:\Users\stop_\(redacted)\blog\resources
Name: \\?\C:\Users\stop_\(redacted)\blog\static
Name: \\?\C:\Users\stop_\(redacted)\blog\storage
Name: \\?\C:\Users\stop_\(redacted)\blog\themes
Error: Engine directory could not be created at C:\Users\stop_\AppData\Local\Temp\.tmpZx9gHh\engine

This is a quite incomplete error message in my opinion...

@WaylonWalker
Copy link

I get a very similar issue on Ubuntu 21.10 with my static site. currently the docker image does work, but installing this cli from cargo is not working.

image

@Ember-ruby
Copy link

I also get this same error

@mre
Copy link
Member

mre commented Mar 25, 2022

Can somebody try if this change fixes the problem?
#153
I don't have time to this this right now.

@mre
Copy link
Member

mre commented Mar 25, 2022

I created a pull request here: #154.
If someone could test this and report back I'd be very thankful.

iamnbutler added a commit to iamnbutler/iamnbutler.github.io that referenced this issue Jul 3, 2022
Left off stuck at `Error: Engine directory could not be created`

Looks like there is work ongoing on this here: tinysearch/tinysearch#152
@Jieiku
Copy link
Collaborator

Jieiku commented Aug 1, 2022

I have started implementing tinysearch into the abridge theme: https://github.com/Jieiku/abridge

UPDATE: building from git with master branch works without issue it seems:

sudo npm install terser -g
sudo pacman -S install wasm-pack binaryen
cd ~/.dev
git clone https://github.com/tinysearch/tinysearch
cd tinysearch
cargo build --release
cd ~/.dev/abridge
~/.dev/tinysearch/target/release/tinysearch --optimize --path static public/json/index.html
Unpacking tinysearch WASM engine into temporary directory "/tmp/.tmpbyQ1J5"
Starting unpack
Copying "../engine/src/lib.rs"
Copying "../engine/Cargo.toml"
Copying "../shared/.gitignore"
Copying "../engine/.gitignore"
Copying "../shared/src/lib.rs"
Copying "../shared/Cargo.toml"
Copying index into crate
Compiling WASM module using wasm-pack
[INFO]: Checking for the Wasm target...
[INFO]: Compiling to Wasm...
   Compiling proc-macro2 v1.0.42
   Compiling unicode-ident v1.0.2
   Compiling quote v1.0.20
   Compiling syn v1.0.98
   Compiling serde_derive v1.0.141
   Compiling serde v1.0.141
   Compiling log v0.4.17
   Compiling wasm-bindgen-shared v0.2.82
   Compiling cfg-if v1.0.0
   Compiling once_cell v1.13.0
   Compiling bumpalo v3.10.0
   Compiling serde_json v1.0.82
   Compiling wee_alloc v0.4.5
   Compiling ryu v1.0.10
   Compiling itoa v1.0.2
   Compiling wasm-bindgen v0.2.82
   Compiling cfg-if v0.1.10
   Compiling memory_units v0.4.0
   Compiling wasm-bindgen-backend v0.2.82
   Compiling wasm-bindgen-macro-support v0.2.82
   Compiling wasm-bindgen-macro v0.2.82
   Compiling xorf v0.7.2
   Compiling bincode v1.3.3
   Compiling tinysearch-shared v0.6.3 (/tmp/.tmpbyQ1J5/shared)
   Compiling tinysearch-engine v0.6.3 (/tmp/.tmpbyQ1J5/engine)
    Finished release [optimized] target(s) in 17.17s
[WARN]: :-) origin crate has no README
[INFO]: License key is set in Cargo.toml but no LICENSE file(s) were found; Please add the LICENSE file(s) to your project directory
[INFO]: Installing wasm-bindgen...
[INFO]: found wasm-opt at "/usr/bin/wasm-opt"
[INFO]: Optimizing wasm binaries with `wasm-opt`...
[INFO]: Optional field missing from Cargo.toml: 'repository'. This is not necessary, but recommended
[INFO]: :-) Done in 19.77s
[INFO]: :-) Your wasm pkg is ready to publish at /home/jieiku/.dev/abridge/static.
All done! Open the output folder with a web server to try the demo.

@ardeaf
Copy link

ardeaf commented Aug 6, 2022

Yes, installing from the git master branch works perfectly. No issues.

@mre
Copy link
Member

mre commented Aug 6, 2022

Released fix on crates.io, so no need to use the git master anymore. 🎉 Thanks for the feedback.

@mre mre closed this as completed Aug 6, 2022
@andrewmcodes
Copy link

I just ran into this error on 0.7.0 and @Jieiku's solution of building from git with master branch continues to work.

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

7 participants