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

fix: 'npm install' not working with PWA release zip file #1314

Merged
merged 1 commit into from
Nov 4, 2022

Conversation

shauke
Copy link
Collaborator

@shauke shauke commented Nov 3, 2022

PR Type

[x] Bugfix

What Is the Current Behavior?

If the PWA 3.1.0 release assets (zip or tar.gz - https://github.com/intershop/intershop-pwa/releases/tag/3.1.0) files are used to start a PWA it fails at the npm install.

This is due to the lazy components schematic needing git and a git repository but it checked only for the git command not for being in a git repository.

$ npm install

> intershop-pwa@3.1.0 postinstall
> npm-run-all --silent build:eslint-rules build:schematics synchronize-lazy-components init-development-environment ngcc

fatal: not a git repository (or any of the parent directories): .git
Command failed: git clean -dnx
fatal: not a git repository (or any of the parent directories): .git

npm ERR! code 1
npm ERR! path D:\intershop-pwa-3.1.0
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c npm-run-all --silent build:eslint-rules build:schematics synchronize-lazy-components init-development-environment ngcc

npm ERR! A complete log of this run can be found in:

What Is the New Behavior?

Changed the check from git --version to git status to check for both relevant requirements.

Does this PR Introduce a Breaking Change?

[x] No

Other Information

AB#80842

* lazy components schematic needs git and a git repository but checked only for the git command not for being in a git repository
* if a downloaded PWA release zip file was used to build the PWA it no longer worked and failed at the ' npm install'
@shauke shauke added this to the 3.2 milestone Nov 3, 2022
@shauke shauke self-assigned this Nov 3, 2022
@shauke shauke merged commit 33be4cc into develop Nov 4, 2022
@shauke shauke deleted the bugfix/npm_install_without_git_repository branch November 4, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants