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

The requested module '../cache.js' does not provide an export named 'isCached' #6

Closed
mymikemiller opened this issue May 22, 2024 · 2 comments · Fixed by #7
Closed

Comments

@mymikemiller
Copy link

I'm getting the following error when running the canpack command

file:///Users/mike/.nvm/versions/node/v20.13.1/lib/node_modules/ic-mops/dist/commands/install.js:10
import { addCache, copyCache, isCached } from '../cache.js';
                              ^^^^^^^^
SyntaxError: The requested module '../cache.js' does not provide an export named 'isCached'

My test project can be found here. Note that I'm not even trying to import any crates yet, but even if I do I get the same error when running canpack

Is this tool in a working state right now?

My ultimate goal is to use the functions exposed in Amazon's S3 rust crate (as described in the Rust section here) from within my Motoko canister. I'm under the impression that I should be able to essentially import it into a rust canister (using canpack) and call its functions from my own Rust canister, and ultimately from one of my Motoko canisters via an inter-canister query.

If this isn't the right way to go about things, I'm all ears! I was referred to canpack via this and this forum post and the referenced thread investigating the ability to do this type of thing.

Any and all advice is appreciated, and thanks for your work on this!

@rvanasa
Copy link
Collaborator

rvanasa commented May 24, 2024

Hi! Thanks for your interest in this library! This appears to be a bug with a previous version of the ic-mops dependency; I will update the canpack npm package to hopefully fix this issue.

Let me know if you continue to encounter this error message on the latest version (v0.2.3). Currently at an airport, so I will work on this as soon as possible.

@rvanasa
Copy link
Collaborator

rvanasa commented May 27, 2024

Released version 0.2.3, which should fix this error message. I'll reopen the issue if needed. Cheers!

@rvanasa rvanasa closed this as completed May 27, 2024
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

Successfully merging a pull request may close this issue.

2 participants