Version
4.6.0
Description
I was trying to create a CI build for my Nodejs Azure Function, but got errors all the time when running func pack --no-build command with the following error:
'local.settings.json' found in root directory (/<projectpath>).
'local.settings.json' found in root directory (/<projectpath>).
The value cannot be an empty string. (Parameter 'path')
I changed the command to func pack . --no-build, then the error changed to (since GitHub CoPilot advised this) and then the error switched to:
'local.settings.json' found in root directory (/<projectpath>).
'local.settings.json' found in root directory (/<projectpath>).
Unsupported runtime: None
I diffed the files locally and on the CI build and the only difference was that the local.settings.json was the difference. I added this and then suddenly everything worked.
The project was created using func new and the exclusion of local.settings.json is done by the default creation, so the question is: Is the problem that func new excludes files that are required, or is the problem that func pack depends on file that it shouldn't?
Steps to reproduce
- Create a project using
func new, use Node and Typescript.
- Commit the project into a git repo.
- Install node packages with
npm install
- Build the project running
npm run build
- Trim packages using
npm ci --omit=dev
- Clone the git repo into a new folder and try tu run
func pack --no-build and func pack . --no-build.You will get the errors as described above.
Version
4.6.0
Description
I was trying to create a CI build for my Nodejs Azure Function, but got errors all the time when running
func pack --no-buildcommand with the following error:I changed the command to
func pack . --no-build, then the error changed to (since GitHub CoPilot advised this) and then the error switched to:I diffed the files locally and on the CI build and the only difference was that the
local.settings.jsonwas the difference. I added this and then suddenly everything worked.The project was created using
func newand the exclusion oflocal.settings.jsonis done by the default creation, so the question is: Is the problem thatfunc newexcludes files that are required, or is the problem thatfunc packdepends on file that it shouldn't?Steps to reproduce
func new, useNodeandTypescript.npm installnpm run buildnpm ci --omit=devfunc pack --no-buildandfunc pack . --no-build.You will get the errors as described above.