stropheJS with typescript

91 views
Skip to first unread message

Ahmet Eroglu

unread,
May 22, 2018, 5:56:14 PM5/22/18
to Strophe

Hello I want to use this library in my project, in order to do it, I installed following packages,

npm install --save strophe.js
npm install --save @type/strophe
and then I import the typing with ,
import {Strophe} from "strophe"; in my ts file.
But when I compile my typescript file,I get the followin error.

Error: Cannot find module 'strophe'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/home/ahmet/Documents/MasterProject/LocationBasedChatApp/out/index.js:3:17)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)

I've been trying to solve this since forever, any help will be greatly appreciated!

Reply all
Reply to author
Forward
0 new messages