-
Notifications
You must be signed in to change notification settings - Fork 586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Realmjs not working after deployment in serverless framework #2509
Comments
@mithunph Could you please fill out the issues template? Specifically how we should reproduce this? |
Hi @bmunkholm , I get error in very first line while importing the package |
@mithunph Please fill out the entire issue template that occurs when you click "New Issue". |
Hi @bmunkholm , functions:
3)handler.js const routes = require('./routes/routes.js') module.exports = app; 4)routes.js 5)realmController.js |
Hi @mithunph |
I fixed it by adding the below line in package.json Added below code to build-realm.sh file |
Great @mithunph ! |
Hi, I have installed Realmjs which is working fine in local. But after deployment, it is showing error when i require(or import) that package.
Showing error in the below line
const Realm = require('realm');
Below is the full logs of error:
Unable to import module 'server': Error
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. (/var/task/node_modules/realm/lib/index.js:103:28)
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)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/var/task/controllers/realmController.js:3:15)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
The text was updated successfully, but these errors were encountered: