I've got a project (written in Reason, but compiling to JS) that uses the module https://www.npmjs.com/package/bs-express. When the code is compiled, the require statement for that module looks like this:
var Express = require("bs-express/src/Express.js");
I've definitely added the bs-express
dependency to the package.json
file inside of my functions
folder, and I've verified by hand that the file exists on my dev box.
When I use the command firebase deploy
, the deployment of any functions that use that file fails with this error:
Function load error: Code in file index.js can't be loaded.
Did you list all required modules in the package.json dependencies?
Detailed stack trace: Error: Cannot find module 'bs-express/src/Express.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/user_code/src/Endpoints.bs.js:10:15)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
But, like I said before, firebase serve --only functions
on my developer box works just fine.
firebase --version: 3.17.4
Mac OS 10.13.3
Is there any way to get shell access or something on the container being deployed to so that I can see what exists in the node_modules folder there?