Skip to content

[BUG] npm i -g @swc/cli removed my git repository #3457

@kdy1

Description

@kdy1

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Deletes git repository.
(Removed .git and tracked files)

Expected Behavior

Install without error

Steps To Reproduce

  1. Clone https://github.com/kdy1/swc.git
  2. Checkout resolver branch
  3. npm i
  4. npm run build:dev
  5. npm link
  6. npm i -g @swc/cli

Environment

  • OS: macOS Big Sur
  • Node:
➜  swc-bugs node -v
v14.16.1

Note: I installed latest version of node js because of stack trace issue on github actions.

➜  swc-bugs brew info node
node: stable 16.3.0 (bottled), HEAD
Platform built on V8 to build network applications
https://nodejs.org/
/usr/local/Cellar/node/14.4.0 (107 files, 650KB)
  Built from source
/usr/local/Cellar/node/15.12.0 (3,268 files, 55.5MB)
  Poured from bottle on 2021-03-31 at 15:11:58
/usr/local/Cellar/node/16.2.0 (2,784 files, 49MB) *
  Poured from bottle on 2021-05-30 at 20:06:55
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/node.rb
License: MIT
==> Dependencies
Build: pkg-config ✔, [email protected] ✔
Required: brotli ✔, c-ares ✔, icu4c ✔, libuv ✔, nghttp2 ✔, [email protected] ✔
==> Options
--HEAD
	Install HEAD version
==> Analytics
install: 323,426 (30 days), 1,082,930 (90 days), 4,400,808 (365 days)
install-on-request: 254,200 (30 days), 847,506 (90 days), 3,304,651 (365 days)
build-error: 0 (30 days)
  • npm:
[email protected] /Users/kdy1/.nvm/versions/node/v14.16.1/lib/node_modules/npm

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions