You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use this in express v4.16 on node v16.14.
I have setup express to use es6 syntax (and hence es6 imports for modules only, no require).
I am getting an error in one of my controllers :
TypeError: controllerName.setLanguage is not a function
This was functioning perfectly fine in a previous version of the same app which was not using es6 modules and was using the require('mongoose-intl') syntax.
This is how I am trying to import in app.js :
import mongooseIntl from 'mongoose-intl';
VS Code is giving the following hint in the import statement -
Could not find a declaration file for module 'mongoose-intl'.
Please help.
The text was updated successfully, but these errors were encountered:
I am trying to use this in express v4.16 on node v16.14.
I have setup express to use es6 syntax (and hence es6 imports for modules only, no require).
I am getting an error in one of my controllers :
TypeError: controllerName.setLanguage is not a function
This was functioning perfectly fine in a previous version of the same app which was not using es6 modules and was using the require('mongoose-intl') syntax.
This is how I am trying to import in app.js :
import mongooseIntl from 'mongoose-intl';
VS Code is giving the following hint in the import statement -
Could not find a declaration file for module 'mongoose-intl'.
Please help.
The text was updated successfully, but these errors were encountered: