Skip to content

Serverless. Not able to import package in a serverless function #4037

Answered by reflash
reflash asked this question in General
Discussion options

You must be logged in to vote

it turned to be a problem specific to mongoose
import * as mongoose from 'mongoose' is not working, but const mongoose = require('mongoose'); does for some reason

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@coetry
Comment options

@reflash
Comment options

Answer selected by coetry
Comment options

You must be logged in to vote
1 reply
@bigsee
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants