-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not work after npm i and package config #42
Comments
Hi! Sorry to hear you're having trouble. Can you try using a this in your package.json?
|
How about having a console argument for the matter of that value ? I have a case where i want to run same cz for many instances, i don t feel like i want to duplicate it everywhere. That seems inappropriate to me. I ve gone through your sources, and find quickly you are not using any helper for that. // Get cli args
let rawGitArgs = process.argv.slice(2, process.argv.length); This said, i ran into similar issue on my box too,
I suggest to improve the README.md to better indicate and suggest about the required first adapter, npm i cz-conventional-changelog --save-dev --save-exact I ll check again tomorrow on windows see. |
Thank you for the feedback on the README. It does need to be updated to be more clear. I have opened #27 to track the documentation changes and will make sure to include our discussion. Let's take a look at this lines in the error log you posted. This is an important error:
You had previously configured an adapter but the path was wrong. This error is trying to inform you that In order to tell Commitizen that it is ok to override the previous value, you must re-run the command above with the So, the command would be:
By running this, you should be all set. |
ok, so i cleaned up my env here on windows, re ran,
and got expected results. the new package, the new dependency. So far,
Then update the package file such
Still hang. trying,
same. Also tried,
same. I ve not gone through the source, but i d say it s missing a path.join according to the fact it worked on my linux box and this is about a stupid path resolution issue. Still, i d like to know how you feel about passing this value as a cli parameter. if you feel not to add this, just let it know. |
before i forget, again i really want to suggest about improving the README. Yesterday I really felt this one was hard to read. I d suggest to get something close to those examples https://github.com/substack/node-browserify https://github.com/rvagg/changelog-maker with some clear identified sections about some clearly identified steps (Install, Usage ect). |
Did you try |
Also can you confirm that you have commitizen version 2.3.0 installed? |
Hi there. Hope you aren't still having this problem but if you are, please provide some of the info above. If not I'll probably close it in 3 days. Obviously you can always reopen. |
Hi! Sorry for the lag, i got absorbed into other matters. Yes! i do have 2.3.0
Running
Then
Does it help ? |
And my package json is
BTW! How to do with this commitizen path, which is here windows format, but when i ll get back home, on linux, i will need to use a linux forward slashed path. |
The method we were using to modify json files (specifically the package.json) was overly complex for our relatively simple use case. It also caused several issues on Windows and required a really bizarre syntax. Closes #42
@maboiteaspam I found the problem. All tests are now passing on windows and I swapped out the json editor which seemed to have problems on windows. This is a much simpler method of editing the json and seems to perform much better on windows. If this doesn't fix your problem then please let me know. |
wouav, really cool ! Thanks a lot. Given the commit, i will test install from the repo directly and let you know if that works fine. |
Sounds good! |
just in case, and because i have not seen .appveyor.yml file, i know it s not perfect, but it can help! testing results
: (
weird stuff is
with another package it works nicely
: / If i have time, i ll try to dig that, too. |
ok never mind, i ll re do manually, have not seen before : https://github.com/commitizen/cz-cli/blob/master/.npmignore |
nah, i don't know. I mean, i m not used to es6 stack with babel, and now i m facing weird errors like this
in short,
How about appveyor ? |
Ah, ok. It seems like something is messed up in your environment but I don't know exactly what it is. I would recommend removing your global packages and clearing your npm cache because something is messed up Can you check to see if you have babel 6 installed by running Unfortunately, I don't know anything about appveyor. Sorry. The commitizen workflow really should be as simple as the following: npm install -g [email protected]
mkdir my-javascript-project
cd my-javascript-project
git init
npm init --yes
commitizen init cz-conventional-changelog --save-dev
git add .
git cz If it isn't then something is likely conflicting (eg. babel 6 installed globally) or something is screwed up in your environment. |
Hi ! Thanks for help. Indeed much easier. I hope you can take a moment to check about appveyor, it s very much like travis, but for windows. This said i m sorry to report some failures : /
see,
And the package json looks likes this now : (
|
Note also i un-built babel 6 prior those steps. and commitizen has brought in babel 5.8.29
For the records,
|
@maboiteaspam I haven't been able to replicate this, but in an effort to make sure that our test coverage includes Windows I'm working on getting our tests running on appveyor. |
I wont promise, but if i can free some time at office i ll seriously dig it too. thanks again ! |
Do you guys have something on this uptil now? Here is my simple package.json { } When i try to do npm run commit I get the following:
npm ERR! Windows_NT 6.3.9600 npm ERR! enterprise-config@ commit: npm ERR! Please include the following file with any support request: I am also attaching my log file here My environement:
What am I doing wrong here? Can anyone help please? |
@afirdousi That is odd. Unfortunately, I don't have a Windows 8.1 machine but would you mind trying to run these in powershell to see if it makes any difference? |
hi, I ll just drop that link here, to not forget about it, until i can free time, i believe it may be helpful : ) |
Sounds good. I have appveyor tests running on Windows 2012 R2. The only one
|
Ok all Windows tests are now passing on appveyor. Next I will have to try to figure out if it has something to do with how we're recommending that people configure their package.json's commit script. Thanks for hanging in there. |
Hi @jimthedev , amazing, i can make it work now : ) Happy. But i need to report about something i found weird.
The steps i followed
et voila : ) Will dig about adapters now !! Thanks again. |
Hooray! Thanks for the feedback!
|
kind of forgotten to close, sorry : ) |
Hi!
TLDR; IRFM, ran it, then tried to run
git cz
, it failed with an unfortunate but epic error,The longer story
Running windows 7 with node and npm such
I have run
D:\work\MyBlog\C\c2-bin>npm install -g commitizen
,then
D:\work\MyBlog\C\c2-bin>commitizen init cz-conventional-changelog --save --save-exact
Then i configured my local
package.json
file to addWhere did i get it wrong ?
Thanks !
The text was updated successfully, but these errors were encountered: