Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I have created an angular/ionic app and would like to create some sort of tutorial/walk-through. I looked at quite a few options (including intro.js which was recommended the most) and found EnjoyHint. I really like its style and would like to implement it in my project. However, if I follow the instructions on the
GitHub page
and install EnjoyHint using npm, I get the following error:
Module not found: Error: Can't resolve './jquery.enjoyhint.js' in '\node_modules\xbs-enjoyhint'
I played around a bit (I don't remember what I did exactly) and changed the error to:
ERROR Error: Uncaught (in promise): ReferenceError: global is not defined
Has anyone tried using EnjoyHint with Angular? I would also be open to using something else that has a similar style.
I would appreciate any help I can get.
The npm package has jquery.enjoyhint.js
in the src
directory, so I found it worked if I imported enjoyhint
from the source directory where the relative path could find the necessary files.
import EnjoyHint from "xbs-enjoyhint/src/enjoyhint";
–
This may help someone save time:
This is how I used enjoyhint in one of my Angular project:
npm install xbs-enjoyhint
Got same Error:
global is not defined
There are two ways to fix this (at least what I tried :D)
3.1 Edit polyfills.ts
3.2 Or update this in index.html <- (I used this option)
Note: Also I imported "./node_modules/xbs-enjoyhint/enjoyhint.css"
in angular.json
ng serve
After this it worked
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.