Closed Altair827 closed 8 years ago
You removed the typings command from that package.json.
how could I add it? what I should I change?
Adding it back :P
I used the original package.json and it gave this error
> F:\AngularJS\my-proj>npm run typings -- install
>
> > angular2-quickstart@1.0.0 typings F:\AngularJS\my-proj
> > typings "install"
>
> typings WARN deprecated 7/25/2016: "registry:dt/core-js#0.0.0+20160602141332" is deprecated (updated, replaced or removed)
> typings WARN deprecated 8/23/2016: "registry:dt/node#6.0.0+20160807145350" is deprecated (updated, replaced or removed)
> typings ERR! message Unable to read typings for "core-js". You should check the entry paths in "core-js.d.ts" are up to date
> typings ERR! caused by Unable to connect to "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/95e782233e8e203a0b9283c3a7031faee428a530/core-js/core-js.d.ts"
> typings ERR! caused by self signed certificate in certificate chain
>
> typings ERR! cwd F:\AngularJS\my-proj
> typings ERR! system Windows_NT 10.0.10240
> typings ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Aiden\\AppData\\Roaming\\npm\\node_modules\\typings\\dist\\bin.js" "install"
> typings ERR! node -v v4.5.0
> typings ERR! typings -v 1.3.2
>
> typings ERR! If you need help, you may report this error at:
> typings ERR! <https://github.com/typings/typings/issues>
>
> npm ERR! Windows_NT 10.0.10240
> npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Aiden\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "typings" "--" "install"
> npm ERR! node v4.5.0
> npm ERR! npm v3.10.6
> npm ERR! code ELIFECYCLE
> npm ERR! angular2-quickstart@1.0.0 typings: `typings "install"`
> npm ERR! Exit status 1
> npm ERR!
> npm ERR! Failed at the angular2-quickstart@1.0.0 typings script 'typings "install"'.
> npm ERR! Make sure you have the latest version of node.js and npm installed.
> npm ERR! If you do, this is most likely a problem with the angular2-quickstart package,
> npm ERR! not with npm itself.
> npm ERR! Tell the author that this fails on your system:
> npm ERR! typings "install"
> npm ERR! You can get information on how to open an issue for this project with:
> npm ERR! npm bugs angular2-quickstart
> npm ERR! Or if that isn't available, you can get their info via:
> npm ERR! npm owner ls angular2-quickstart
> npm ERR! There is likely additional logging output above.
>
> npm ERR! Please include the following file with any support request:
> npm ERR! F:\AngularJS\my-proj\npm-debug.log
That is the first time I see that error, seems like it cannot connect to that url for some reason (a self signed certificate).
I have no idea at all.
Is there any way around to create typings?
Are you behind a proxy?
See if this helps: https://github.com/typings/typings/blob/master/docs/faq.md#configuration
Hi I do not see typings in your package.json file. It should be added like below.
{ "name": "angular2-quickstart", "version": "1.0.0", "scripts": { "start": "concurrently \"npm run tsc:w\" \"npm run lite\" ", "lite": "lite-server", "postinstall": "typings install", "tsc": "tsc", "tsc:w": "tsc -w", "typings": "typings" };
My full package.json
{ "name": "angular2-quickstart", "version": "1.0.0", "scripts": { "start": "concurrently \"npm run tsc:w\" \"npm run lite\" ", "lite": "lite-server", "postinstall": "typings install", "tsc": "tsc", "tsc:w": "tsc -w", "typings": "typings" }, "license": "ISC", "dependencies": { "@angular/common": "2.0.0-rc.5", "@angular/compiler": "2.0.0-rc.5", "@angular/core": "2.0.0-rc.5", "@angular/forms": "0.3.0", "@angular/http": "2.0.0-rc.5", "@angular/platform-browser": "2.0.0-rc.5", "@angular/platform-browser-dynamic": "2.0.0-rc.5", "@angular/router": "3.0.0-rc.1", "@angular/router-deprecated": "2.0.0-rc.2", "@angular/upgrade": "2.0.0-rc.5", "systemjs": "0.19.27", "core-js": "^2.4.0", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.6", "zone.js": "^0.6.12", "angular2-in-memory-web-api": "0.0.15", "bootstrap": "^3.3.6" }, "devDependencies": { "concurrently": "^2.0.0", "lite-server": "^2.2.0", "typescript": "^1.8.10", "typings":"^1.0.4" } }
What about the last line @hhhcube? :P
I do not understand which last line you are referring to @Foxandxss
I found the problem.. It was the proxy. I created a .typingsrc file with
{
"rejectUnauthorized": false
}
It installed typings successfully.
$ npm run typings install
> angular2-quickstart@1.0.0 typings F:\AngularJS\my-proj
> typings "install"
typings WARN deprecated 7/25/2016: "registry:dt/core-js#0.0.0+20160602141332" is deprecated (updated, replaced or removed)
typings WARN deprecated 8/23/2016: "registry:dt/node#6.0.0+20160807145350" is deprecated (updated, replaced or removed)
├── angular-protractor (global)
├── core-js (global)
├── jasmine (global)
├── node (global)
└── selenium-webdriver (global)
@Altair827 this solves the problem
I am windows10 user and tried to install angular2. I couldn't insatll it with
npm install
at first but with an modified package.json Ii was able to install it.It didn't created a typings folder so I ran
npm run typings -- install
which produced this errorWhat should I do to install it?