NPM 및 angular2를 처음 사용합니다. 자체 NPM 패키지를 만들고 로컬로 설치하려고합니다.npm 패키지가 예상대로 설치되지 않습니다.
├── .npmignore
├── README.md
├── LICENSE
├── index.html
├── package.json
├── main.js
├── styles.css
├── tsconfig.json
├── typings.json
├── app
│ └── app.component.ts
│ └── app.module.ts
│ └── main.js
│ └── main.ts
을하지만 내가 노력하고 내가 단지 node_modules
폴더를 얻을 다른 디렉토리에 설치하는 경우 : 내가 포함 된 패키지 확실히 (테스트 패키지 0.0.1.tgz를) 만들 수 관리 할 수 있습니다. 내가 test-package-0.0.1.tgz
및 npm install C:\otherfolder\platform-core-webui-0.0.1.tgz
이 패키지를 설치 만들 npm pack
을 사용하고
.
다음은 Windows 환경에서 실행되는 package.json
파일과 메신저의 내용입니다.
{
"name": "test-package",
"version": "0.0.1",
"description": "Test package",
"author": "me",
"publishConfig": {
"registry": "http://localnpmrepository/npm"
},
"scripts": {
"start": "tsc && concurrently \"tsc -w\" \"lite-server\" ",
"lite": "lite-server",
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings"
},
"license": "UNLICENSED",
"dependencies": {
"@angular/common": "~2.0.2",
"@angular/compiler": "~2.0.2",
"@angular/core": "~2.0.2",
"@angular/forms": "~2.0.2",
"@angular/http": "~2.0.2",
"@angular/platform-browser": "~2.0.2",
"@angular/platform-browser-dynamic": "~2.0.2",
"@angular/router": "~3.0.2",
"@angular/upgrade": "~2.0.2",
"angular-in-memory-web-api": "~0.1.5",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.8",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.39",
"zone.js": "^0.6.25"
},
"devDependencies": {
"concurrently": "^3.0.0",
"lite-server": "^2.2.2",
"typescript": "^2.0.3",
"typings": "^1.4.0"
},
"main": "main.js"
}
나는 내 설치하지 단지
node_modules
폴더 후 동일한 폴더 구조를 볼 기대했다. 내가 어디로 잘못 가고 있니?