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

compileSchema.call is not a function #479

Open
sh0derun opened this issue Jun 8, 2018 · 4 comments
Open

compileSchema.call is not a function #479

sh0derun opened this issue Jun 8, 2018 · 4 comments

Comments

@sh0derun
Copy link

sh0derun commented Jun 8, 2018

hello,
i have a bug when i start nin command
`
C:\Users\msys\AppData\Roaming\npm\node_modules\ninjadev-nin\node_modules\ajv\lib
\ajv.js:330
try { v = compileSchema.call(self, schemaObj.schema, root, schemaObj.localRe
fs); }
^

TypeError: compileSchema.call is not a function
at _compile (C:\Users\msys\AppData\Roaming\npm\node_modules\ninjadev-nin\nod
e_modules\ajv\lib\ajv.js:330:29)
at getSchema (C:\Users\msys\AppData\Roaming\npm\node_modules\ninjadev-nin\no
de_modules\ajv\lib\ajv.js:194:51)
at validate (C:\Users\msys\AppData\Roaming\npm\node_modules\ninjadev-nin\nod
e_modules\ajv\lib\ajv.js:93:11)
at validateSchema (C:\Users\msys\AppData\Roaming\npm\node_modules\ninjadev-n
in\node_modules\ajv\lib\ajv.js:164:19)
at _addSchema (C:\Users\msys\AppData\Roaming\npm\node_modules\ninjadev-nin\n
ode_modules\ajv\lib\ajv.js:290:7)
at Ajv.compile (C:\Users\msys\AppData\Roaming\npm\node_modules\ninjadev-nin
node_modules\ajv\lib\ajv.js:115:21)
at Ajv.addKeyword (C:\Users\msys\AppData\Roaming\npm\node_modules\ninjadev-n
in\node_modules\ajv\lib\keyword.js:57:40)
at defFunc (C:\Users\msys\AppData\Roaming\npm\node_modules\ninjadev-nin\node
_modules\ajv-keywords\keywords\instanceof.js:46:7)
at defineKeywords (C:\Users\msys\AppData\Roaming\npm\node_modules\ninjadev-n
in\node_modules\ajv-keywords\index.js:17:22)
at Object. (C:\Users\msys\AppData\Roaming\npm\node_modules\ninjad
ev-nin\node_modules\webpack\lib\validateSchema.js:13:24)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\msys\AppData\Roaming\npm\node_modules\ninjad
ev-nin\node_modules\webpack\lib\webpack.js:12:24)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\msys\AppData\Roaming\npm\node_modules\ninjad
ev-nin\nin\backend\dasbootgen.js:1:79)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\msys\AppData\Roaming\npm\node_modules\ninjad
ev-nin\nin\backend\compile.js:11:20)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\msys\AppData\Roaming\npm\node_modules\ninjad
ev-nin\nin\backend\nin:3:17)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:423:7)
at startup (bootstrap_node.js:147:9)
at bootstrap_node.js:538:3
`

@sigvef
Copy link
Member

sigvef commented Jun 8, 2018

Thanks for the bug report. Can you try uninstalling nin via npm and installing it using the Developer setup in the Readme instead? That way we can see if there is a bug in nin itself, or just the packaging on npm.

@stianjensen
Copy link
Member

Btw, which version of node are you running on? We at least require version 7.9.0 as a minimum.

@sh0derun
Copy link
Author

sh0derun commented Jun 8, 2018

Thanks for reply. @stianjensen I'm using v8.11 of nodejs. @sigvef yeah i think the problem is from the packaging on npm because it worked when i tried Developer setup.

@stianjensen
Copy link
Member

This is most likely due to you getting different versions of the ajv package installed when downlading from npm vs. from GitHub. Especially if you used yarn to install dependencies when cloning from GitHub.

I see ajv is a transitive dependency we're getting via webpack, and in any case I'll make a PR to upgrade our webpack dependency now, which as a side-effect will also upgrade our ajv dep. So hopefully that same bug won't trigger anymore when we've released that as a new version on npm!

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

3 participants