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 have a Netlify function A located in functions/netlify-a/netlify-a.js. It relies on some method b() located in functions/helpers/b.js. This will work locally when running netlify dev, but won't work in production with the following message.
I understand that helpers are not bundled during the build time. What's the recommended way to fix this issue? I am already running npm install on every function folder to install npm dependencies, how would I go about importing helper methods without publishing them as a separate npm package?
Thanks!
The text was updated successfully, but these errors were encountered:
@mrlubos just sent you an email on how to opt into the netlify build beta. There are new function bundling updates in there that might solve this resolution issue.
Hey @DavidWells, I tried the beta build and I can happily confirm it works! 🎉
Very surprising I haven't come across anyone else mentioning this as I'd expect more people running Netlify Dev reusing common code in their Netlify Functions. Oh well...
Btw, do you have any front-end roles available at Netlify? 🧐
Hey,
I have a Netlify function A located in
functions/netlify-a/netlify-a.js
. It relies on some methodb()
located infunctions/helpers/b.js
. This will work locally when runningnetlify dev
, but won't work in production with the following message.I understand that helpers are not bundled during the build time. What's the recommended way to fix this issue? I am already running
npm install
on every function folder to installnpm
dependencies, how would I go about importing helper methods without publishing them as a separate npm package?Thanks!
The text was updated successfully, but these errors were encountered: