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

Could not find find "Cargo.toml". Did not copy cdylib:skia-canvas #52

Closed
KorrumzPL opened this issue Feb 18, 2023 · 7 comments
Closed
Assignees

Comments

@KorrumzPL
Copy link

KorrumzPL commented Feb 18, 2023

When I tried to install this package using the command:

npm i captcha-canvas

it displays me this error:

ubuntu@skyndalex:~/SkyndalexPrivate$ npm i captcha-canvas
npm WARN deprecated crypto@1.0.1: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated event-to-promise@0.7.0: Use promise-toolbox/fromEvent instead
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated json2csv@4.5.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm ERR! code 101
npm ERR! path /home/ubuntu/SkyndalexPrivate/node_modules/skia-canvas
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install || npm run build -- --release
npm ERR! response status 403 Forbidden on https://skia-canvas.s3.us-east-1.amazonaws.com/v1.0.1/linux-arm64-napi-v6-glibc.tar.gz
npm ERR! 
npm ERR! > skia-canvas@1.0.1 build
npm ERR! > cargo-cp-artifact -nc lib/v6/index.node -- cargo build --message-format=json-render-diagnostics --release
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.10
npm ERR! node-pre-gyp info using node@19.3.0 | linux | arm64
npm ERR! node-pre-gyp info check checked for "/home/ubuntu/SkyndalexPrivate/node_modules/skia-canvas/lib/v6/index.node" (not found)
npm ERR! node-pre-gyp http GET https://skia-canvas.s3.us-east-1.amazonaws.com/v1.0.1/linux-arm64-napi-v6-glibc.tar.gz
npm ERR! node-pre-gyp ERR! install response status 403 Forbidden on https://skia-canvas.s3.us-east-1.amazonaws.com/v1.0.1/linux-arm64-napi-v6-glibc.tar.gz 
npm ERR! node-pre-gyp ERR! install error 
npm ERR! node-pre-gyp ERR! stack Error: response status 403 Forbidden on https://skia-canvas.s3.us-east-1.amazonaws.com/v1.0.1/linux-arm64-napi-v6-glibc.tar.gz
npm ERR! node-pre-gyp ERR! stack     at /home/ubuntu/SkyndalexPrivate/node_modules/@mapbox/node-pre-gyp/lib/install.js:67:15
npm ERR! node-pre-gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR! node-pre-gyp ERR! System Linux 5.15.0-1029-oracle
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/home/ubuntu/SkyndalexPrivate/node_modules/.bin/node-pre-gyp" "install"
npm ERR! node-pre-gyp ERR! cwd /home/ubuntu/SkyndalexPrivate/node_modules/skia-canvas
npm ERR! node-pre-gyp ERR! node -v v19.3.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
npm ERR! node-pre-gyp ERR! not ok 
npm ERR! error: could not find `Cargo.toml` in `/home/ubuntu/SkyndalexPrivate/node_modules/skia-canvas` or any parent directory
npm ERR! Did not copy "cdylib:skia-canvas"

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2023-02-18T20_47_27_728Z-debug-0.log
ubuntu@skyndalex:~/SkyndalexPrivate$ ^C

I installed rust and checked all other things to make sure they were implemented correctly. Here is what the cargo command alone gives me:

ubuntu@skyndalex:~/SkyndalexPrivate$ cargo
Rust's package manager

Usage: cargo [+toolchain] [OPTIONS] [COMMAND]

Options:
  -V, --version             Print version info and exit
      --list                List installed commands
      --explain <CODE>      Run `rustc --explain CODE`
  -v, --verbose...          Use verbose output (-vv very verbose/build.rs output)
  -q, --quiet               Do not print cargo log messages
      --color <WHEN>        Coloring: auto, always, never
      --frozen              Require Cargo.lock and cache are up to date
      --locked              Require Cargo.lock is up to date
      --offline             Run without accessing the network
      --config <KEY=VALUE>  Override a configuration value
  -Z <FLAG>                 Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
  -h, --help                Print help information

Some common cargo commands are (see all commands with --list):
    build, b    Compile the current package
    check, c    Analyze the current package and report errors, but don't build object files
    clean       Remove the target directory
    doc, d      Build this package's and its dependencies' documentation
    new         Create a new cargo package
    init        Create a new cargo package in an existing directory
    add         Add dependencies to a manifest file
    remove      Remove dependencies from a manifest file
    run, r      Run a binary or example of the local package
    test, t     Run the tests
    bench       Run the benchmarks
    update      Update dependencies listed in Cargo.lock
    search      Search registry for crates
    publish     Package and upload this package to the registry
    install     Install a Rust binary. Default location is $HOME/.cargo/bin
    uninstall   Uninstall a Rust binary

See 'cargo help <command>' for more information on a specific command.
ubuntu@skyndalex:~/SkyndalexPrivate$ ^C

I also tried using sudo, however, it does not work.

@Shashank3736
Copy link
Owner

Can you please share your os, node and npm version?

@Shashank3736 Shashank3736 self-assigned this Feb 19, 2023
@KorrumzPL
Copy link
Author

Can you please share your os, node and npm version?

os: ubuntu
npm: 9.4.0
node: v19.3.0

@KorrumzPL
Copy link
Author

Can you please share your os, node and npm version?

os: ubuntu npm: 9.4.0 node: v19.3.0

I hope I don't have too old or too new a version of something

@Shashank3736
Copy link
Owner

Shashank3736 commented Feb 20, 2023

I tested this on node 18.14.1. This is version is currently in LTS so it's better if you try again using this.

My OS: ubuntu 22.04
node: 18.14.1

@Shashank3736
Copy link
Owner

Shashank3736 commented Feb 20, 2023

BTW it's a known issue caused by skia-canvas you can see here you should try using v2.3.1 as it works with canvas module.


You can find documentation for v2 here

@KorrumzPL
Copy link
Author

It seems that installing version v2.3.1 worked. Thanks for your reply. If there are any problems with the package, I will write about them

@Shashank3736
Copy link
Owner

If your problem is solved I am closing the issue.

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