tdegrunt / jsonschema

JSON Schema validation
Other
1.83k stars 263 forks source link

ENOENT: no such file or directory, scandir 'test/suite/tests/draft3' #303

Closed parmarmitesh closed 4 years ago

parmarmitesh commented 4 years ago

I am using npm version:- 6.13.4 and node version:- 12.16.1

Following is the error I am getting while executing npm test,so can you help me please in this or suggest me if I missing something.

jsonschema@1.2.6 test /jsonschema

mocha -R spec

internal/fs/utils.js:230 throw err; ^

Error: ENOENT: no such file or directory, scandir 'test/suite/tests/draft3' at Object.readdirSync (fs.js:871:3) at /jsonschema/test/suite.js:26:8 at Array.forEach () at Suite. (/jsonschema/test/suite.js:25:9) at Object.create (/jsonschema/node_modules/mocha/lib/interfaces/common.js:114:19) at context.describe.context.context (/jsonschema/node_modules/mocha/lib/interfaces/bdd.js:44:27) at Object. (/jsonschema/test/suite.js:23:1) at Module._compile (internal/modules/cjs/loader.js:1158:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10) at Module.load (internal/modules/cjs/loader.js:1002:32) at Function.Module._load (internal/modules/cjs/loader.js:901:14) at Module.require (internal/modules/cjs/loader.js:1044:19) at require (internal/modules/cjs/helpers.js:77:18) at /jsonschema/node_modules/mocha/lib/mocha.js:231:27 at Array.forEach () at Mocha.loadFiles (/jsonschema/node_modules/mocha/lib/mocha.js:228:14) at Mocha.run (/jsonschema/node_modules/mocha/lib/mocha.js:514:10) at Object. (/jsonschema/node_modules/mocha/bin/_mocha:480:18) at Module._compile (internal/modules/cjs/loader.js:1158:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10) at Module.load (internal/modules/cjs/loader.js:1002:32) at Function.Module._load (internal/modules/cjs/loader.js:901:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) at internal/main/run_main_module.js:18:47 { errno: -2, syscall: 'scandir', code: 'ENOENT', path: 'test/suite/tests/draft3' }

awwright commented 4 years ago

@parmarmitesh Try initializing the git submodules; git submodule update --init

Let me know how that works for you.

parmarmitesh commented 4 years ago

@awwright Thanks, now its working by initializing the git submodules which you had mentioned.