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

Alternate base seems to break something #31

Closed
skilesare opened this issue Dec 17, 2022 · 2 comments
Closed

Alternate base seems to break something #31

skilesare opened this issue Dec 17, 2022 · 2 comments

Comments

@skilesare
Copy link

I tried to add an alternate base as @di-wu does in https://github.com/aviate-labs/json.mo and I get an odd error on mops install

[dependencies]
base = "https://github.com/dfinity/motoko-base#494824a2787aee24ab4a5888aa519deb05ecfd60"
xtendedNumbers = "https://github.com/edjcase/motoko_numbers#v1.0.0"
base-0.7.3 = "https://github.com/dfinity/motoko-base#3a20693fc597b96a8c7cf8645fda7a3534d13e5fbda28c00d01f0b7641efe494"

[package]
name = "candid"
version = "0.1.0"
description = "A Candid library for encoding and decoding candid bytes"
repository = "https://github.com/edjcase/motoko_candid"
mops install
file:///opt/homebrew/lib/node_modules/ic-mops/mops.js:130
                if (data.startsWith('https://github.com/')){
                         ^

TypeError: data.startsWith is not a function
    at file:///opt/homebrew/lib/node_modules/ic-mops/mops.js:130:12
    at Array.forEach (<anonymous>)
    at readConfig (file:///opt/homebrew/lib/node_modules/ic-mops/mops.js:129:23)
    at Command.<anonymous> (file:///opt/homebrew/lib/node_modules/ic-mops/cli.js:43:13)
    at Command.listener [as _actionHandler] (/opt/homebrew/lib/node_modules/ic-mops/node_modules/commander/lib/command.js:482:17)
    at /opt/homebrew/lib/node_modules/ic-mops/node_modules/commander/lib/command.js:1264:65
    at Command._chainOrCall (/opt/homebrew/lib/node_modules/ic-mops/node_modules/commander/lib/command.js:1158:12)
    at Command._parseCommand (/opt/homebrew/lib/node_modules/ic-mops/node_modules/commander/lib/command.js:1264:27)
    at /opt/homebrew/lib/node_modules/ic-mops/node_modules/commander/lib/command.js:1062:27
    at Command._chainOrCall (/opt/homebrew/lib/node_modules/ic-mops/node_modules/commander/lib/command.js:1158:12)

@skilesare
Copy link
Author

This works:

base-0-7-3 = "https://github.com/dfinity/motoko-base#aafcdee0c8328087aeed506e64aa2ff4ed329b47"

So it may be a parsing issue with "."

@ZenVoich
Copy link
Owner

This appears to be an invalid key in TOML.
Wrapping the key in double quotes should also work:

"base-0.7.3" = "https://github.com/dfinity/motoko-base#3a20693fc597b96a8c7cf8645fda7a3534d13e5fbda28c00d01f0b7641efe494"

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