-
Notifications
You must be signed in to change notification settings - Fork 465
Open
Description
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, useNodeandTypescript. - 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-buildandfunc pack . --no-build.You will get the errors as described above.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels