Error: Public folder assets must be nested in public/assets folder
tim-trifecta opened this issue · comments
Hello! I was using the npx --package @sladg/nextjs-lambda next-utils pack
command and I keep getting the error: Process failed with error: Error: Public folder assets must be nested in public/assets folder.
My next config looks like this:
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
output: "standalone",
compress: false,
};
I am using the command in the root directory and have my public folder structured like this: public/assets/files.svg, etc.
is there something im not setting up correctly?
Much appreciated!
Hey!
Can you try running ls -la ./public
?
There might be some hidden files generated by system (happens especially on MacOS) that might be causing structure to not be correct.
That was it, there was the autogenerated .DS_Store folder in the directory. After removing the directory it packed up properly! Thanks again!
Hey @tim-trifecta
I am also seeing the same error. After some investigation, I figured out it's happening because I have .well-known
folder in public
directory.
Could you help me understand what I am doing wrong here? I would really appreciate it. 😄
Run ls -la1 ./public
it should give you list of all files/folders, even hidden ones.
Script expects just a single folder, aka. assets
to exist, if anything else exists in public
folder, it will return error as your structure is not compatible.