node.js - visual studio not finding firebase node module -


i used command npm install firebase --save root of project folder , firebase folder added node_modules folder , packages.json updated.

i use typescript have app.ts file try , import firebase = require("firebase");

however doesn't work. red squiggles , error saying cannot find external module "firebase".

i have installed express , importing in app.ts , works fine, no errors.

i have tried through firebase source minified , impossible try , finding there, exported , such.

any ideas might wrong , how can fix it?

three things:

  • you should download firebase type definition typed using nuget, tsd, or other method.
  • the firebase definition on typed doesn't seem written in external module form. may need add line export = firebase; @ bottom of it.
  • typescript has odd default behavior definition files (d.ts) describe external modules written in javascript; search in each directory directory file root of current drive looking .ts or .d.ts file name matches name of thing you've imported. best bet move firebase.d.ts file root of project. if you're interested in bit more discussion on this, check out https://github.com/microsoft/typescript/issues/2338 . they're working on it.

if 3 things, should work.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -