# Npm update issue

**URL:** <https://discourse.aurelia.io/t/npm-update-issue/928>\
**Category:** Help Requests\
**Created:** [March 19, 2018, 11:18pm UTC](https://discourse.aurelia.io/t/npm-update-issue/928 "2018-03-19T23:18:10Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![winter\_limelight](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/winter_limelight/32/226_2.png) [@winter\_limelight](https://discourse.aurelia.io/u/winter_limelight)\
**Post date:** [March 19, 2018, 11:18pm UTC](https://discourse.aurelia.io/t/npm-update-issue/928/1 "2018-03-19T23:18:10Z")

</div>

I ran `npm update` this morning and now my app doesn’t run. This was an update of aurelia-bootstrapper from 2.1.1 to 2.2.0. I also deleted node\_modules and ran `npm install` after the first failure. I also walked it back using git and did only `npm update aurelia-bootstrapper` to establish that was the responsible change.

By using breakpoints I established main.ts code is being executed but configureRouter in App.ts is not. There are no console errors.  
My main.ts includes aurelia.use.standardConfiguration()

Was there a configuration change or something with this update that I’ve missed (didn’t see anything obvious in the release notes at [http://aurelia.io/blog/2018/01/22/big-changes-in-the-aurelia-router-150-release](http://aurelia.io/blog/2018/01/22/big-changes-in-the-aurelia-router-150-release)).?

---

<div class="post-metadata">

**Author:** ![Alexander-Taran](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/alexander-taran/32/2308_2.png) [@Alexander-Taran](https://discourse.aurelia.io/u/Alexander-Taran)\
**Post date:** [March 19, 2018, 11:20pm UTC](https://discourse.aurelia.io/t/npm-update-issue/928/2 "2018-03-19T23:20:19Z")

</div>

what version npm?  
do you have package.lock.json?

yes? delete along with node\_modules and `npm i`  
also what setup do you use? CLI || Skeleton?

---

<div class="post-metadata">

**Author:** ![winter\_limelight](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/winter_limelight/32/226_2.png) [@winter\_limelight](https://discourse.aurelia.io/u/winter_limelight)\
**Post date:** [March 19, 2018, 11:22pm UTC](https://discourse.aurelia.io/t/npm-update-issue/928/3 "2018-03-19T23:22:24Z")

</div>

npm -v = 5.7.1  
I have package.lock.json  
Using cli, currently on 0.32.0 (trying to update to 0.33.1 today failed).

---

<div class="post-metadata">

**Author:** ![winter\_limelight](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/winter_limelight/32/226_2.png) [@winter\_limelight](https://discourse.aurelia.io/u/winter_limelight)\
**Post date:** [March 19, 2018, 11:24pm UTC](https://discourse.aurelia.io/t/npm-update-issue/928/4 "2018-03-19T23:24:52Z")

</div>

I couldn’t tell you if it was based on a skeleton - it’s been in progress for a year. I have kept the aurelia\_project/tasks .ts files up to date as I’ve upgraded the aurelia-cli.

---

<div class="post-metadata">

**Author:** ![Alexander-Taran](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/alexander-taran/32/2308_2.png) [@Alexander-Taran](https://discourse.aurelia.io/u/Alexander-Taran)\
**Post date:** [March 19, 2018, 11:28pm UTC](https://discourse.aurelia.io/t/npm-update-issue/928/5 "2018-03-19T23:28:37Z")

</div>

> [@winter\_limelight](#):
>
> currently on 0.32.0 (trying to update to 0.33.1 today failed).

failed how?  
You got to be more specific.

You are the first to report it.  
Obviously it is about your specific environment.

Can’t help you if we know nothing about it.  
OS  
node version  
CLI version  
etc

most probably something wrong with dependencies.  
configureRouter should be called if it is there.

can you as well create a new project with cli and see if it runs ok?  
bootstrapper 2.2.0 is out for a while.  
but other libraries could have been not updated in your setup due to package.lock.json

---

<div class="post-metadata">

**Author:** ![winter\_limelight](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/winter_limelight/32/226_2.png) [@winter\_limelight](https://discourse.aurelia.io/u/winter_limelight)\
**Post date:** [March 19, 2018, 11:34pm UTC](https://discourse.aurelia.io/t/npm-update-issue/928/6 "2018-03-19T23:34:28Z")

</div>

OK well lol @ the aurelia-cli update - turns out npm’s latest column is in the same color as powershell’s background - only noticed when I pasted here (I thought latest was empty, but can actually see 0.33.1 now).

> npm outdated -g --depth=0  
> Package Current Wanted Latest Location  
> aurelia-cli 0.32.0 0.32.0 0.33.1

But `npm update -g aurelia-cli` did nothing.

---

<div class="post-metadata">

**Author:** ![Alexander-Taran](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/alexander-taran/32/2308_2.png) [@Alexander-Taran](https://discourse.aurelia.io/u/Alexander-Taran)\
**Post date:** [March 19, 2018, 11:39pm UTC](https://discourse.aurelia.io/t/npm-update-issue/928/7 "2018-03-19T23:39:44Z")

</div>

> [@winter\_limelight](#):
>
> But npm update -g aurelia-cli did nothing.

do `npm i -g aurelia-cli`

---

<div class="post-metadata">

**Author:** ![winter\_limelight](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/winter_limelight/32/226_2.png) [@winter\_limelight](https://discourse.aurelia.io/u/winter_limelight)\
**Post date:** [March 19, 2018, 11:41pm UTC](https://discourse.aurelia.io/t/npm-update-issue/928/8 "2018-03-19T23:41:27Z")

</div>

Yes that worked (without the - on i): `npm -g i aurelia-cli`

---

<div class="post-metadata">

**Author:** ![Alexander-Taran](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/alexander-taran/32/2308_2.png) [@Alexander-Taran](https://discourse.aurelia.io/u/Alexander-Taran)\
**Post date:** [March 19, 2018, 11:42pm UTC](https://discourse.aurelia.io/t/npm-update-issue/928/9 "2018-03-19T23:42:57Z")

</div>

Ok (-:  
move on to

```auto
au new testing-that-it-works

```

---

<div class="post-metadata">

**Author:** ![winter\_limelight](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/winter_limelight/32/226_2.png) [@winter\_limelight](https://discourse.aurelia.io/u/winter_limelight)\
**Post date:** [March 19, 2018, 11:43pm UTC](https://discourse.aurelia.io/t/npm-update-issue/928/10 "2018-03-19T23:43:20Z")

</div>

au new project (before upgrade to 0.33.1) using typescript option works - displays “Hello World”.  
As it does for 0.33.1 altho via webpack rather than cli.  
Am going to update tasks .ts files to those found in 0.33.1 in my main project and upgrade again and see if it helps.

---

<div class="post-metadata">

**Author:** ![winter\_limelight](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/winter_limelight/32/226_2.png) [@winter\_limelight](https://discourse.aurelia.io/u/winter_limelight)\
**Post date:** [March 20, 2018, 12:32am UTC](https://discourse.aurelia.io/t/npm-update-issue/928/11 "2018-03-20T00:32:02Z")

</div>

With aurelia-cli 0.33.1 in place:

package.json containing: “aurelia-bootstrapper”: “^2.1.1”, “aurelia-fetch-client”: “^1.2.0”  
PS D:\path\> rm -r -force .\node\_modules  
PS D:\path\> npm i  
PS D:\path\> au run  
Starts fine.

I have found one area of significant difference.  
My devDependencies are quite out of date compared with a new project - most notably aurelia-tools - because ^1.x.y in npm doesn’t update major versions.

Unfortunately even after updating all of those and package.json containing: “aurelia-bootstrapper”: “^2.2.0”, “aurelia-fetch-client”: “^1.3.1”  
PS D:\path\> rm -r -force .\node\_modules  
PS D:\path\> npm i  
PS D:\path\> au run  
configureRouter is not hit.

To earlier questions: Windows 10, node -v gives v8.9.4, npm -v gives 5.7.1

---

<div class="post-metadata">

**Author:** ![winter\_limelight](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/winter_limelight/32/226_2.png) [@winter\_limelight](https://discourse.aurelia.io/u/winter_limelight)\
**Post date:** [March 20, 2018, 2:32am UTC](https://discourse.aurelia.io/t/npm-update-issue/928/12 "2018-03-20T02:32:06Z")

</div>

Ok - put a .catch on main.ts aurelia.start() and got `"RangeError: Maximum call stack size exceeded at ViewCompiler._compileElement (http://localhost:9000/resources/vendor-bundle.js:54237:70)`

This is the `ViewCompiler.prototype._compileElement` method and it seems to get stuck on a node: `button.dialog-close`.

My impression is this is ux-dialog which I am using as `use.plugin('aurelia-dialog')`, and have two different dialog templates. The element it has got stuck on contains a span with an X, so I’m guessing it’s the close button.

Stepping further the 4th attribute is `if.bind = showCloseButton` which creates a `liftingInstruction`. Inside the `if(liftingInstruction)` condition there is a call to `node = liftingInstruction.type.compile(this, resources, node, liftingInstruction, parentNode);` which is where the infinite recursion occurs.

I’ve copied my dialog templates into a new project and they’ve seemed fine there. Both project.json files have “aurelia-dialog”: “^1.0.0-rc.2.0.0” as a dependency. So I’m now at a bit of a loss.

---

<div class="post-metadata">

**Author:** ![winter\_limelight](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/winter_limelight/32/226_2.png) [@winter\_limelight](https://discourse.aurelia.io/u/winter_limelight)\
**Post date:** [March 20, 2018, 6:33am UTC](https://discourse.aurelia.io/t/npm-update-issue/928/13 "2018-03-20T06:33:03Z")

</div>

I think I’ve made it go away… not really sure how… but I added two steps to my node clearing process and it seems better now:  
PS D:\path\> rm -r -force .\node\_modules  
PS D:\path\> npm cache clean --force  
PS D:\path\> rm -force .\package-lock.json  
PS D:\path\> npm i

The trick seems to have been the package-lock as the cache clean by itself had no effect. I will not claim to even modestly understand npm and why it might behave this way…

---

<div class="post-metadata">

**Author:** ![Alexander-Taran](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/alexander-taran/32/2308_2.png) [@Alexander-Taran](https://discourse.aurelia.io/u/Alexander-Taran)\
**Post date:** [March 20, 2018, 7:33am UTC](https://discourse.aurelia.io/t/npm-update-issue/928/14 "2018-03-20T07:33:39Z")

</div>

Using Internet Explorer by any chance?

---

<div class="post-metadata">

**Author:** ![Alexander-Taran](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/alexander-taran/32/2308_2.png) [@Alexander-Taran](https://discourse.aurelia.io/u/Alexander-Taran)\
**Post date:** [March 20, 2018, 7:37am UTC](https://discourse.aurelia.io/t/npm-update-issue/928/15 "2018-03-20T07:37:36Z")

</div>

> [@winter\_limelight](#):
>
> The trick seems to have been the package-lock

Dude… That’s like the first reply I gave you.

---

<div class="post-metadata">

**Author:** ![winter\_limelight](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/winter_limelight/32/226_2.png) [@winter\_limelight](https://discourse.aurelia.io/u/winter_limelight)\
**Post date:** [March 20, 2018, 8:24am UTC](https://discourse.aurelia.io/t/npm-update-issue/928/16 "2018-03-20T08:24:16Z")

</div>

I would have found it more helpful in a different communication style.

You asked “do you have package.lock.json?” to which I replied “I have package.lock.json” and then you said “but other libraries could have been not updated in your setup due to package.lock.json”. At no stage was there a suggestion to “try deleting the package.lock.json”, something I haven’t needed to do before.

I also found the following comments unnecessary.

> [@Alexander-Taran](#):
>
> You got to be more specific.  
> You are the first to report it.  
> Obviously it is about your specific environment.  
> Can’t help you if we know nothing about it.

If there is information that would be helpful why not ask for it? I started this thread under the assumption I’d just missed something during an upgrade, not that I was running into packaging/npm problems, so that information didn’t feel necessary at that point.

I appreciate that you’re providing a significant level of responses on this site and that is appreciated. But I would suggest that if the goal is to provide a positive, supportive, and encouraging community, then perhaps we could focus on asking clarifying questions and suggesting possible remedies.

---

<div class="post-metadata">

**Author:** ![mttmccb](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/mttmccb/32/38_2.png) [@mttmccb](https://discourse.aurelia.io/u/mttmccb)\
**Post date:** [March 20, 2018, 8:45am UTC](https://discourse.aurelia.io/t/npm-update-issue/928/17 "2018-03-20T08:45:31Z")

</div>

I’ve had similar problems with npm lately, I can’t add a package with first deleting my node\_modules folder and sometimes also the package.lock.json.

Tempted to switch to yarn as it’s had time to sort those stupid problems.

---

<div class="post-metadata">

**Author:** ![Alexander-Taran](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/alexander-taran/32/2308_2.png) [@Alexander-Taran](https://discourse.aurelia.io/u/Alexander-Taran)\
**Post date:** [March 20, 2018, 2:01pm UTC](https://discourse.aurelia.io/t/npm-update-issue/928/18 "2018-03-20T14:01:17Z")

</div>

> [@winter\_limelight](#):
>
> At no stage was there a suggestion to “try deleting the package.lock.json”

![image](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/1X/b54b863770a0b4348dc98b6b872113c86da5e064.png)

Yes. Communication style could be different… I guess…  
You could have also payed attention to answers provided.

I pretty much understand that “askers” just need their problem solved.

Here is a very nice blog post by John Skeet about your frustrations:

> **[Stack Overflow Culture](https://codeblog.jonskeet.uk/2018/03/17/stack-overflow-culture/)**
>
> This blog post was most directly provoked by this tweet from my friend Rob Conery, explaining why he’s giving up contributing on Stack Overflow. However, it’s been a long time coming. A…

I’m not sorry I’m a bit disappointed that we both spent more time than was required to solve this one.  
Could have ended with my first reply.

P.S.  
got to change my signature to House M.D.

---

<div class="post-metadata">

**Author:** ![zewa666](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/zewa666/32/19_2.png) [@zewa666](https://discourse.aurelia.io/u/zewa666)\
**Post date:** [March 20, 2018, 3:12pm UTC](https://discourse.aurelia.io/t/npm-update-issue/928/19 "2018-03-20T15:12:05Z")

</div>

@winter_limelight, @Alexander-Taran alright boys, everybody can have that wrong day in the week. Lets keep it professional 😉
