package.json is required to work
crisperit opened this issue · comments
When running that plugin without package.json - the following error is being throwed (I've set default build command to echo skip
and disabled nvm usage)
pm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated statsd-client@0.4.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
added 1428 packages, and audited 1429 packages in 45s
187 packages are looking for funding
run `npm fund` for details
18 vulnerabilities (1 low, 10 moderate, 7 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /github/workspace/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/github/workspace/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
After adding the package.json this is solved - but shall it really be required if I just want to push already built web ?
I think it would be good idea to use docker image with already preinstalled netlify-cli like https://hub.docker.com/r/williamjackson/netlify-cli (which also might reduce action work time). The issue with package.json is maybe throwed because it tries to install netlify-cli
Hi @crisperit !
You are absolutely right, we shouldn't need a package.json to install netlify-cli.
Your issue actually references an issue I opened a while ago, GitHub pre-installs these cli tools on their ubuntu-latest distribtions (maybe macos and windows too?): #35 . Sadly I haven't taken the time to test it out.
Would you be willing to fork this repo and give that a try? It might mean migrating away from docker-actions and just creating a composite action though
OK, I can give a try
Thanks @crisperit ! Let me know how it goes!
I've posted the PR buut mine issue with package.json is required was resolved differently - via passing:
use_nvm: false
install_command: "echo skip installing dependencies"
still having this issue
Any fix? 🙂