I have a JSPM/Typescript/Angular 1.5.3 project. I want to use a new component router . In my dir project, I used the command
jspm install npm:@angular/router
which is installed without errors. Then I added it to my app.ts file using
import ngComponentRouter from 'jspm_packages/npm/@angular/ router@0.2.0 /angular1/angular_1_router'
But when I start my lite-server , I get
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/jspm_packages/npm/@angular/instruction.json Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/jspm_packages/npm/@angular/utils.json Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/jspm_packages/npm/@angular/url_parser.json
I'm not sure why he wants to download these mysterious JSON files, so I checked my package.json package:
{ "jspm": { "name": "app", "dependencies": { "": "npm:@angular/ router@ ^0.2.0", "angular": "npm: angular@ ^1.5.3",
Hmmm ... that empty "" doesn't look right. I feel that the build step is missing if JSPM cannot resolve the package name and the router requests JSON files. What am I doing wrong here?
source share