Closed caiobiodere closed 4 years ago
Thanks for reporting this issue. I created a skeleton project and both npm install
and yarn install
complete without errors.
Would you try deleting the node_modules
directory and try again? I'd like to understand why if that works.
Edit: node-git-hooks
is a dependency of this project. I'm puzzled why it didn't install that under node_modules.
https://github.com/BugiDev/react-native-calendar-strip/blob/master/package.json#L38
@peacechen I also am receiving the above error. I have deleted my node_module
directory and my yarn.lock
file and tried yarn add react-native-calendar-strip
, both pre and post install of all my other packages. One thing to note, I am using expo
.
Here is my full error:
yarn add v1.17.3
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
error /Users/waynedunkley/Sites/journal/node_modules/react-native-calendar-strip: Command failed.
Exit code: 127
Command: ./node_modules/.bin/node-git-hooks
Arguments:
Directory: /Users/waynedunkley/Sites/journal/node_modules/react-native-calendar-strip
Output:
env: node\r: No such file or directory
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
It looks like you're running on OSX. This could be caused by line endings.
For reference -- steps to fix line endings.
I'll publish a new version with a corrected script.
I came across the same possible issue 👍
Edit: Yes, I am running on OSX
@waynedunkley @caiobiodere I published the fix in node-git-hooks 1.0.2 which this library should pull since it's a minor version change. Please delete node_modules again to force it to pull the new version of node-git-hooks.
I've deleted node_modules
and re-added react-native-calendar-strip
. But I still receive the same error. I can confirm that it has added v 1.0.2
of node-git-hooks
into node_modules
Update, the new error comes back as:
yarn add v1.17.3
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
[1/4] ⠂ core-js
[2/4] ⠂ fsevents
[3/4] ⠂ core-js-pure
error /Users/waynedunkley/Sites/journal/node_modules/react-native-calendar-strip: Command failed.
Exit code: 127
Command: ./node_modules/.bin/node-git-hooks
Arguments:
Directory: /Users/waynedunkley/Sites/journal/node_modules/react-native-calendar-strip
It's worth noting those empty line breaks are coming back with the error
Thanks for the quick testing. Can you tell which line is causing the error? It's not clear to me from the log output.
The above error is the full scope of what I am receiving from yarn add react-native-calendar-strip
yarn add react-native-calendar-strip@v2.0.3
works fine
That makes sense since 2.0.3 doesn't use node-git-hooks. I dusted off a gimpy OSX box and tested with npm and yarn. Surprisingly, npm works but yarn throws an error. Would you try npm install react-native-calendar-strip --save
?
I'll test more on this end when I get this OSX box stable enough.
I had already tried npm and it installs without any issues, I'm only getting the error with yarn
I published node-git-hooks 1.0.3 and it works on OSX using yarn add react-native-calendar-strip
. Please confirm whether it's working on your end.
@peacechen Just tested yarn add react-native-calendar-strip
and the package is installing and working as expected 💯
BTW. Great work on the package as well 👍
Thanks for your help diagnosing and validating the fix 👍
error /Users/caiobiodere/Projects/testing/node_modules/react-native-calendar-strip: Command failed. Exit code: 127 Command: ./node_modules/.bin/node-git-hooks
I was checking this and it might be because install-git-hooks is not being included in the package, did you try installing the plugin with yarn?