Botkit: Error: Cannot find module 'skills-validator'

Created on 30 Mar 2020  路  8Comments  路  Source: howdyai/botkit

* DO NOT ERASE THESE INSTRUCTIONS WITHOUT READING THEM FIRST *

Are you sure this is an issue with the Botkit core module?

Yes, it seems the problem was introduced in the last version upgrade.

What are you trying to achieve or the steps to reproduce?

const Botkit = require('botkit');

What was the result you received?

Screenshot 2020-03-30 at 18 53 04

What did you expect?

No error

Screenshots and animated GIFs

Context:

  • Botkit version: 0.7.6
  • Messaging Platform:
  • Node version: 13
  • Os: Linux
  • Any other relevant information:

All 8 comments

Thanks for the report. Does this happen during npm install?

You are using version 0.7.6 of Botkit? Does rolling back to 0.7.5 fix this?

Downgraded to 0.7.5 - problem still persists :(

cat node_modules/botbuilder/lib/bots/ChatConnector.js| grep skills
var skills_validator_1 = require("skills-validator");
            if (this.settings.enableSkills === true && skills_validator_1.SkillValidation.isSkillToken(authHeaderValue)) {
                var authConfiguration = this.settings.authConfiguration || new skills_validator_1.DefaultAuthenticationConfiguration(this.settings.allowedCallers);
                skills_validator_1.JwtTokenValidation.authenticateRequest(skillMsg, authHeaderValue, new skills_validator_1.SimpleCredentialProvider(this.settings.appId, this.settings.appPassword), req.body.serviceUrl, authConfiguration).then(function (claimsIdentity) {
                    var oauthScope = skills_validator_1.JwtTokenValidation.getAppIdFromClaims(claimsIdentity.claims);
                    var creds = new skills_validator_1.MicrosoftAppCredentials(_this.settings.appId, _this.settings.appPassword, oauthScope);
ls node_modules/botbuilder/package.json| grep skills

empty

@neemah did you ever find a fix for this? I'm seeing the same error.

I started debugging this issue as a fresh https://github.com/looker/lookerbot install and deploy to Heroku consistently threw this error. I've found the following hints:

  1. Lookerbot is using a very old version of botkit: 0.6.19
  2. botbuilder has a postinstall script to install skills-validator that doesn't seem to be executed unless you use npm install in Heroku
  3. Even if it's installed, npm ls skills-validator fails to resolve the dependency.

Workaround:

yarn add ./node_modules/botbuilder/skills-validator/skills-validator-1.0.0.tgz

I am facing this same issue when I am upgrading botkit version from 0.7.4 to 0.7.6 . It is necessary for me to upgrade it as I believe this version contains fix for slack oauth v2. I tried above workaround as well but with this heroku deployment just keeps running and it keeps showing

-----> Installing dependencies

   Installing node modules

I am not sure why this issue is closed, Is there any fix available for this issue?

heroku config:set NPM_CONFIG_PRODUCTION=false

or

heroku config:set YARN_PRODUCTION=false (for yarn)

Update the heroku config and deploy via heroku cli is a workaround until the core issue is fixed. The above commands disable pruning when deploying heroku apps to prod

I solved the issue deleting the node_modules and installing again the dependencies, but now I'm seeing issues with deprecated functions

Was this page helpful?
0 / 5 - 0 ratings

Related issues

imjul1an picture imjul1an  路  3Comments

matueranet picture matueranet  路  4Comments

benbrown picture benbrown  路  3Comments

seriousssam picture seriousssam  路  3Comments

liornaar picture liornaar  路  3Comments