Directories in 'includeFiles' not being included in the layer0 nuxtjs bundle

While the directories in ‘includeFiles’ are included in the build of layer0 and nextjs, the same fails for layer0 and nuxtjs projects. Please find the issue reproduction at: rishi-raj-jain/layer0-nuxt-includeFiles

Hi Rishi,

I cloned your repo, ran npm i and then layer0 build and see that .layer0/lambda/something/nothing.js is being properly included in the bundle. I deployed the site and have confirmed the resources get uploaded correctly.

Can you provide any specific error message or steps to reproduce the issue?

I think you might not be using windows. I just did the rebuild (screenshot attached), and the folder is not being included. I suspect it gets included in OSes other than windows like macOS.

Found what’s the problem with Windows! Windows globby.sync no longer works for window’s paths · Issue #130 · sindresorhus/globby (github.com)

To confirm this, I go into the @layer0/core node_module and log the files that the code globby_1.default.sync results in, which is empty list (as can be seen in the screenshot below)

I think due to the GitHub issue as mentioned, the files variable is empty, hence no files get’s copied.

Thanks for digging into that. I have created a patch that has fixed this for my test in Windows. Can you try and confirm that it works for you? Just run layer0 use 3.16.5-next-1629906552-199ebb31.0 to update your dependencies to this build, and then run layer0 build and check the .layer0/lambda/ path to verify your files have been copied.

Once confirmed, I’ll work on an official release for this patch.

1 Like

Thanks. Works like a charm :100:

We’ve made an official release of this fix. You may use the same upgrade procedure as above to version 3.16.5.