npm run test error
zziyan opened this issue · comments
zziyan commented
I don't know where is the error
trailmix\packages\screen-test> npm run test
> sample-screen@2.0.0 test
> jest --runInBand
FAIL ./index.spec.js
● Test suite failed to run
Cannot find module '@nut-tree/nut-js' from 'index.spec.js'
1 | "use strict";
2 |
> 3 | const { screen, Region, imageResource } = require("@nut-tree/nut-js");
| ^
4 | require("@nut-tree/template-matcher");
5 |
6 | describe("Screen test", () => {
at Resolver._throwModNotFoundError (C:/Users/xxx/AppData/Roaming/npm/node_modules/jest/node_modules/jest-resolve/build/resolver.js:427:11)
at Object.require (index.spec.js:3:43)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.42 s
Ran all test suites.
my environment :
C:\Users\xxx>node -v
v16.19.0
C:\Users\xxx>npm -v
9.4.1
C:\Users\xxx>npm info @nut-tree/nut-js
@nut-tree/nut-js@3.0.0 | Apache-2.0 | deps: 4 | versions: 241
Native system automation for node.js
https://nutjs.dev
keywords: native, system, automation, testing, keyboard, mouse, process, memory, window, screen, monitor, display, timer, clock, clipboard
dist
.tarball: https://registry.npmjs.org/@nut-tree/nut-js/-/nut-js-3.0.0.tgz
.shasum: 779311aad7c02c0d8786ec3f88051a58db82617b
.integrity: sha512-JauhmhAZ5pbHJNU0gN9Wy1MB4Uj3L3Ih47YE45UCus1oQChAxUw2cSwYlob3NVsnpkSOQ3XWsfmY0APKpDzyAQ==
.unpackedSize: 666.1 kB
dependencies:
@nut-tree/libnut: 2.4.0 clipboardy: 2.3.0 jimp: 0.16.2 node-abort-controller: 2.0.0
maintainers:
- s1hofmann <dev@simon-hofmann.org>
dist-tags:
latest: 3.0.0 next: 3.0.1-next.20230124085453
published 2 weeks ago by s1hofmann <dev@simon-hofmann.org>
C:\Users\xxx>npm info @nut-tree/template-matcher
@nut-tree/template-matcher@2.0.0 | Proprietary | deps: 1 | versions: 15
Locate images on your screen using template matching in nut.js
https://nutjs.dev
keywords: native, system, automation, testing, screen, monitor, display, opencv
dist
.tarball: https://registry.npmjs.org/@nut-tree/template-matcher/-/template-matcher-2.0.0.tgz
.shasum: a7f0d7e7dfd2445ea295330034a988670dfa68fd
.integrity: sha512-6aJzDwXV8Wsr6C5nw1fstS2T50xiOvJ/Ec6n5b9pJXQGQk96aCskOyoC3QLt/HljBJQM0b+OuaAOC24IZwCEhw==
.unpackedSize: 75.3 kB
dependencies:
opencv4nodejs-prebuilt: 5.3.3
maintainers:
- s1hofmann <dev@simon-hofmann.org>
dist-tags:
latest: 2.0.0 next: 2.0.1-next.20230118225716
published 2 weeks ago by s1hofmann <dev@simon-hofmann.org>
C:\Users\xxx>npm info jest
jest@29.4.1 | MIT | deps: 4 | versions: 340
Delightful JavaScript Testing.
https://jestjs.io/
keywords: ava, babel, coverage, easy, expect, facebook, immersive, instant, jasmine, jest, jsdom, mocha, mocking, painless, qunit, runner, sandboxed, snapshot, tap, tape, test, testing, typescript, watch
bin: jest
dist
.tarball: https://registry.npmjs.org/jest/-/jest-29.4.1.tgz
.shasum: bb34baca8e05901b49c02c62f1183a6182ea1785
.integrity: sha512-cknimw7gAXPDOmj0QqztlxVtBVCw2lYY9CeIE5N6kD+kET1H4H79HSNISJmijb1HF+qk+G+ploJgiDi5k/fRlg==
.unpackedSize: 5.4 kB
dependencies:
@jest/core: ^29.4.1 @jest/types: ^29.4.1 import-local: ^3.0.2 jest-cli: ^29.4.1
maintainers:
- scotthovestadt <scott.hovestadt@gmail.com>
- zpao <paul@oshannessy.com>
- rubennorte <rubennorte@gmail.com>
- simenb <sbekkhus91@gmail.com>
- fb <opensource+npm@fb.com>
- aaronabramov <aaron@abramov.io>
- davidzilburg <davidzilburg@gmail.com>
dist-tags:
latest: 29.4.1 next: 29.0.0-alpha.6
published a week ago by simenb <sbekkhus91@gmail.com>
opencv 4.7.0
windows 10 LTSC 2019
Simon Hofmann commented
Hi @zziyan 👋
this looks more like a problem with your node_modules
.
Did you give it a retry after cleaning the node_modules
folder?
My check on a new clone on Windows 10 runs fine.
zziyan commented
thank you