Skip to content
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

Building new site package fails with an error on random system configurations #2154

Open
KaterinaPashkevich opened this issue Jul 6, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@KaterinaPashkevich
Copy link
Collaborator

KaterinaPashkevich commented Jul 6, 2023

Description

Building a new site package ends with the git error:
fatal: Not a valid object name HEAD

Steps to reproduce

Build a new site template using the script:

export starter_name=b1 && \
export dest='/path/to/'${starter_name} && \
cd /repo/Bodiless-JS/ && \
git clean -fxd && npm i && \
/Users/user_name/someFolder/someFolder/Bodiless-JS/packages/bodiless-cli/bin/bodiless new -r HEAD --clone-local --dest ${dest} --name ${starter_name} --site-template '__vital_next__' && \
cd '/path/to/'${starter_name} && \
git status 

note: replace path and options as needed , for ex.:

export starter_name=b1 && \
export dest='/Users/Katerina_Pashkevich/Documents/WorkingFolder/new-site/'${starter_name} && \
cd Bodiless/Bodiless-JS
git clean -fxd && npm i && \
/Users/Katerina_Pashkevich/Documents/WorkingFolder/Bodiless/Bodiless-JS/packages/bodiless-cli/bin/bodiless new -r HEAD --clone-local --dest ${dest} --name ${starter_name} --site-template '__vital_next__' && \
cd ../../new-site/${starter_name} && \
git status 

Expected result

Site building process completed successfully, no errors observed

Actual result

Error occurs

Building package...

> b1-monorepo@0.0.0 build:packages
> npx -y turbo build --filter=./packages/*

 ERROR  run failed: error hashing package files: git error: 'git ls-tree' in /Users/Katerina_Pashkevich/Documents/WorkingFolder/new-site/b1/packages/b1 exited with code 128 stderr: fatal: Not a valid object name HEAD

Turbo error: error hashing package files: git error: 'git ls-tree' in /Users/Katerina_Pashkevich/Documents/WorkingFolder/new-site/b1/packages/b1 exited with code 128 stderr: fatal: Not a valid object name HEAD

npm ERR! code 1
npm ERR! path /Users/Katerina_Pashkevich/Documents/WorkingFolder/new-site/b1
npm ERR! command failed
npm ERR! command sh -c ./postinstall.sh

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Katerina_Pashkevich/.npm/_logs/2023-07-06T18_10_38_788Z-debug-0.log
    Error: Exit code 1 in npm

Screenshot 2023-07-06 at 21 23 09

Environment

OS: MacOS Ventura 13.3.1 (a)
node v18.16.1

Note: reproducible only on specific system configurations

Affected Version

branch on which the issue occurs.

@KaterinaPashkevich KaterinaPashkevich added the bug Something isn't working label Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant