Skip to content

Error: Cannot find module 'popper' from '\node_modules\shepherd.js\dist\js' #201

@vsdmoraes

Description

@vsdmoraes

Hello there!

I just trying to add the Shepherd in my current project.
I installed the both (Popper.js too) by NPM, and imported in my library:

import Walkthrough from './library/Walkthrough'
new Walkthrough().init()

So I followed the example:

import 'popper.js'
import Shepherd from 'shepherd.js'

class Walkthrough {
  constructor () {
    this.$step1 = $('.o-quicklinks')
  }

  init () {
    this.bindEvents()
  }

  bindEvents () {
    let tour = new Shepherd.Tour({
      defaults: {
        classes: 'shepherd-theme-arrows'
      }
    })
    tour.addStep('example', {
      title: 'Example Shepherd',
      text: 'Creating a Shepherd is easy too! Just create ...',
      attachTo: this.$step1,
      advanceOn: '.docs-link click'
    })

    tour.start()
  }
}

export default Walkthrough

I got this error:

Error: Cannot find module 'popper' from '\node_modules\shepherd.js\dist\js'

What can I do?

Thanks,
Vinícius Moraes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions