Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run playground - problems with RxJs #255

Closed
TarasKovalenko opened this issue Dec 26, 2017 · 16 comments
Closed

npm run playground - problems with RxJs #255

TarasKovalenko opened this issue Dec 26, 2017 · 16 comments

Comments

@TarasKovalenko
Copy link

I have created empty library following the official guideline.
After that trying to run npm run playground to check if it's work.
After automatically opening new browser window I have catch next exception:

image

node -v: v9.2.1
npm -v: 5.6.0

Any idea how to resolve this issue?

@caroso1222
Copy link
Contributor

I'm not getting the error with your repro steps. Did you try saving some file inside the /src folder? that should trigger a rebuild

@TarasKovalenko
Copy link
Author

TarasKovalenko commented Jan 11, 2018

@caroso1222
My steps:

1. npm install -g yo
2. npm install -g generator-angular2-library

3. mkdir angular-library-name
4. cd angular-library-name

5. yo angular2-library

6. npm run build

7. npm run playground

Can you please give me your steps to the build a library?

@caroso1222
Copy link
Contributor

caroso1222 commented Jan 12, 2018

I just tried those steps again. I'm not getting the RxJS error yet, but I do get this error:

Failed to load resource: the server responded with a status of 404 (Not Found)
localhost/:16 Error: Fetch error: 404 Not Found
  Instantiating http://localhost:3000/.playground/index.js
  Loading .playground/index.js
    at fetch.js:37
    at ZoneDelegate.invoke (zone.js:388)
    at Zone.run (zone.js:138)
    at zone.js:858
    at ZoneDelegate.invokeTask (zone.js:421)
    at Zone.runTask (zone.js:188)
    at drainMicroTaskQueue (zone.js:595)
    at <anonymous>

After that, if I kill the process and run npm run playground again, it works. It's weird. Does running it again works for you?

@caroso1222
Copy link
Contributor

caroso1222 commented Jan 12, 2018

Might be a duplicate of #244

@jvandemo
Copy link
Owner

jvandemo commented Jan 12, 2018

@caroso1222 — Thank you for the reproduction attempt 👍

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

Thanks in advance!

@TarasKovalenko
Copy link
Author

TarasKovalenko commented Jan 23, 2018

@jvandemo @izifortune Hey, any update on this issue?
Thanks!

@izifortune
Copy link
Collaborator

izifortune commented Jan 23, 2018 via email

@TarasKovalenko
Copy link
Author

@izifortune Thank you for your feedback. Please update this issue if you catch something new.

@izifortune
Copy link
Collaborator

Hi @TarasKovalenko can you please try to pull this PR #274 and see if that's still an issue?

@jvandemo
Copy link
Owner

Thank you, @izifortune 🏆

@TarasKovalenko
Copy link
Author

@izifortune Hey, for now, all work perfect, thank you!

@jvandemo
Copy link
Owner

@TarasKovalenko — Thank you for the confirmation.

@izifortune — Thank you for the follow-up 🏆

@TeodorKolev
Copy link

Same here. Not fixed

@joshuawwright
Copy link

I found a poor workaround:

  1. Run the command npm run playground
  2. Copy the index.js and index.js.map from the .playground/playground directory to the .playground directory.
  3. Refresh browser.

@joshuawwright
Copy link

Actual Fix:

In playground/index.html, make the following changes:
System.import('.playground/index.js').catch(function(err){ console.error(err); }); to System.import('.playground/playground/index.js').catch(function(err){ console.error(err); });

In playground/index.ts, make the following changes":
import { "Name of your module" } from '../src/'; to import { "Name of your module" } from '../src/index';

@jvandemo
Copy link
Owner

@DesertFoxNV — Thank you for sharing 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants