generator-angular2-library icon indicating copy to clipboard operation
generator-angular2-library copied to clipboard

Playground encounters 404 errors for rxjs

Open sishuoyang opened this issue 7 years ago • 6 comments

Hi,

I need some helps here to get my library project running using the playground. Appreciate any pieces of advice.

I can successfully compile the library to dist folder. When I run npm lite, I get this error in browser console window: image There is also an 404 error in the lite-server: image

Below is my systemjs.config.js:

'use strict';
/**
 * System configuration for Angular samples
 * Adjust as necessary for your application needs.
 */
(function () {
  System.config({
    paths: {
      // paths serve as alias
      'npm:': '../node_modules/'
    },
    // map tells the System loader where to look for things
    map: {
      // our app is within the app folder
      app: 'app',

      // angular bundles
      '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
      '@angular/common': 'npm:@angular/common/bundles/common.umd.js',
      '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
      '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
      '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
      '@angular/http': 'npm:@angular/http/bundles/http.umd.js',
      '@angular/router': 'npm:@angular/router/bundles/router.umd.js',
      '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',

      // other libraries
      rxjs: 'npm:rxjs',
      'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
      'ng-lib-test': '../dist'
    },
    // packages tells the System loader how to load when no filename and/or no extension
    packages: {
      app: {
        defaultExtension: 'js',
        meta: {
          './*.js': {
            loader: 'systemjs-angular-loader.js'
          }
        }
      },
      rxjs: {
        defaultExtension: 'js'
      },
      'ng-lib-test': {
        main: 'ng-lib-test.umd.js',
        defaultExtension: 'js'
      }
    }
  });
})(this);

sishuoyang avatar Dec 08 '17 04:12 sishuoyang

Related: https://github.com/jvandemo/generator-angular2-library/issues/255

caroso1222 avatar Jan 12 '18 03:01 caroso1222

@caroso1222 — Thank you for your follow-up.

@izifortune — Would you be able to have a look a this?

Thanks in advance!

jvandemo avatar Jan 12 '18 06:01 jvandemo

Same here:

image

Any updates?

zgabievi avatar Jan 26 '18 08:01 zgabievi

Hi @sheldonyss do you have the same problem running npm run playground ? Because npm run lite its meant to be runned only inside the other command not as a standalone

izifortune avatar Jan 27 '18 12:01 izifortune

Same here

TeodorKolev avatar Mar 30 '18 13:03 TeodorKolev

Same here. I got 404 at fetch.js at first, then i deleted .playground and got 404 at system.src.js

zxxsinventory avatar Apr 11 '18 11:04 zxxsinventory