stencil-community / stencil-app-starter

Minimal starter project for building web components with Stencil
https://github.com/ionic-team/stencil
MIT License
320 stars 102 forks source link

Stencil router issue. Unable to `npm start` #40

Closed gvhuyssteen closed 6 years ago

gvhuyssteen commented 6 years ago

Stencil version: (run npm list @stencil/core from a terminal/cmd prompt and paste output below):

➜  stencil-app-starter git:(master) ✗ npm list @stencil/core
@stencil/starter@0.0.1 /Developer/MessAround/stencil-app-starter
└── @stencil/core@0.4.0

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com

Current behavior: When running npm start the following errors appear related to the router

TypeError: Cannot read property 'set' of undefined
    at Router.componentWillLoad (my-app.js:902)
    at update (app.core.js:611)
    at plt.queue.add (app.core.js:578)
    at doWork (app.core.js:1197) 3 "STENCIL-ROUTER"

TypeError: Cannot read property 'subscribe' of undefined
    at Route.componentWillLoad (my-app.js:47)
    at update (app.core.js:611)
    at plt.queue.add (app.core.js:578)
    at doWork (app.core.js:1197) 3 "STENCIL-ROUTE"
screen shot 2018-02-09 at 20 51 49 screen shot 2018-02-09 at 20 52 31

Expected behavior: Router should route and display components

Steps to reproduce:

git clone https://github.com/ionic-team/stencil-starter.git my-app
cd my-app
git remote rm origin
npm install
npm start

Other information:

I'm on this commit version:

commit 36418417821d1ece2244aad0527efbb226758eed (HEAD -> master, origin/master, origin/HEAD)
Author: jgw96 <jgw9617@gmail.com>
Date:   Fri Feb 9 09:48:35 2018 -0600

I'm on this versions:

➜  stencil-app-starter git:(master) ✗ node -v
v8.9.4
➜  stencil-app-starter git:(master) ✗ npm -v
5.6.0
jthoms1 commented 6 years ago

This was resolved with release 0.0.25 of @stencil/router.

gvhuyssteen commented 6 years ago

@jthoms1 Thank you for such a quick turnaround.

I ran npm update npm start and it works 100%.