我之前做過如下:semver從哪裏來?
MacBook-Pro:bb-ns-ng-dr ishandutta2007$ npm uninstall -g semver
MacBook-Pro:bb-ns-ng-dr ishandutta2007$ npm uninstall semver
MacBook-Pro:bb-ns-ng-dr ishandutta2007$ rm -rf platforms/
MacBook-Pro:bb-ns-ng-dr ishandutta2007$ rm -rf node_modules/
MacBook-Pro:bb-ns-ng-dr ishandutta2007$ tns build android --clean
我不斷收到semver重複資源錯誤,即使semver既不是任何的節點模塊I定義,也沒有任何theri三級依賴。拋開重複資源的共鳴,我更加好奇它是如何擺在首位的。
Could not merge source set folders: [app/node_modules/semver/semver.min.js] /Users/ishandutta2007/Documents/Projects/bb-ns-ng-dr/platforms/android/src/main/assets/app/node_modules/semver/semver.min.js [app/node_modules/semver/semver.min.js] /Users/ishandutta2007/Documents/Projects/bb-ns-ng-dr/platforms/android/src/main/assets/app/node_modules/semver/semver.min.js.gz: Error: Duplicate resources [app/node_modules/semver/semver.browser.js] /Users/ishandutta2007/Documents/Projects/bb-ns-ng-dr/platforms/android/src/main/assets/app/node_modules/semver/semver.browser.js [app/node_modules/semver/semver.browser.js] /Users/ishandutta2007/Documents/Projects/bb-ns-ng-dr/platforms/android/src/main/assets/app/node_modules/semver/semver.browser.js.gz: Error: Duplicate resources
這裏是我的節點模塊包樹的樣子
MacBook-Pro:bb-ns-ng-dr ishandutta2007$ npm ls
/Users/ishandutta2007/Documents/Projects/bb-ns-ng-dr
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── UNMET PEER DEPENDENCY @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @ngrx/[email protected]
├── @ngrx/[email protected]
├── @ngrx/[email protected]
├── @ngrx/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
└── [email protected]
npm ERR! peer dep missing: @angular/[email protected]^2.0.0, required by @ngrx/[email protected]
npm ERR! peer dep missing: @angular/[email protected]^2.0.0, required by @ngrx/[email protected]
npm ERR! peer dep missing: @angular/[email protected]^2.0.0-rc.5, required by [email protected]
我刪除了repo,再次克隆它,運行'''npm i''',現在我也不在node_modules中進行semver,也不能重現上述問題。 – ishandutta2007