Closed moritzebeling closed 3 years ago
Seems like this is a npx
problem, specific to Windows. You're using Windows, right? Which Node and npm version? Unfortunately, I don't have a fix, since the bug isn't part of kirbyup itself.
To prevent security and user-experience problems from mistyping package names, npx prompts before installing anything. The -y
or --yes
option just prevents this "do you want to install this package" prompt.
Please use the following package.json
instead:
{
"scripts": {
"dev": "kirbyup src/index.js --watch",
"build": "kirbyup src/index.js"
},
"devDependencies": {
"kirbyup": "^0.17.1"
}
}
Thank you for getting back!
I use Mac Big Sur, Node 14.17
and NPM 6.14
.
Your setup is missing the npx
at the beginning of both commands, but otherwise works! Thanks!
{
"scripts": {
"dev": "npx kirbyup src/index.js --watch",
"build": "npx kirbyup src/index.js"
},
"devDependencies": {
"kirbyup": "^0.17.1"
}
}
I see. How unfortunate the Git error is present on macOS as well...
As stated in the readme's requirements:
ℹ️ When using kirbyup with
npx
, npm 7+ is required. Previous versions don't pass CLI arguments to the package invoked. npm 7 is bundled from Node 16 onwards.
The setup posted above works as expected. Using npx in conjunction with npm install
would defeat the intrinsic purpose of npx. However, if you use npx you can drop the dev dependencies package key all together.
Glad to hear it's working now!
Hi, thank you for this package! Since a few days and on several machines I run into the following error:
npm run dev
, I get the following error:My `package.json` looks exactly like the one from the instructions
npx kirbyup src/index.js --watch
directly everything works as expectednpx -y kirbyup src/index.js --watch
I get the same error as above. So maybe it is the-y
flag that is causing the error?The error description looks like if the code tries to assess the
ssh://git@github.com/src/index.js.git
repo, which looks incorrect...