You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just fixed a problem of mine by pinning resolve to 1.6.0... seems possibly related to this. TBH, I don't understand what's going on, but hoping maybe someone here will.
My projects runs on both server and client, with browserify building a bundle for each. Client build is fine (at least in dev where is the only difference is just watchify), but the server/node build is not. I didn't notice the problem in dev because dev doesn't run the code through browserfiy for the server. Node bundle builds without errors, but upon execution I get the error:
TypeError: Cannot read property 'numeral' of undefined
on line
if (typeof window !== 'undefined' && this.numeral && this.numeral.language)
which is in numeral.js (here) and gets included into my app via require('numeral/languages/de') from another package in node_modules.
If you're thinking this doesn't sound related, I'd be inclined to agree, considering the build succeeded and all. But I found this by doing a diff on output of npm ls on an older, working docker image against my current build (my builds do npm install from a clean slate), and manually pinning things that had changed 1-by-1 until pinning [email protected] fixed things. I've undone and redone this pinning a couple of times in isolation, and am sure it was the fix. 1.7.1 is the version which causes my error. 1.7.0 also causes same error.
I'm now inspired to make my build process more robust, but any insight here would be appreciated.
My browserify (^14.4.0) options for node target are:
The text was updated successfully, but these errors were encountered:
tybro0103
changed the title
Odd run-time errors after upgrading from 1.6.0 to 1.7.1
Odd run-time error after upgrading from 1.6.0 to 1.7.1
Apr 17, 2018
I just fixed a problem of mine by pinning
resolve
to1.6.0
... seems possibly related to this. TBH, I don't understand what's going on, but hoping maybe someone here will.My projects runs on both server and client, with browserify building a bundle for each. Client build is fine (at least in dev where is the only difference is just watchify), but the server/node build is not. I didn't notice the problem in dev because dev doesn't run the code through browserfiy for the server. Node bundle builds without errors, but upon execution I get the error:
on line
which is in numeral.js (here) and gets included into my app via
require('numeral/languages/de')
from another package in node_modules.If you're thinking this doesn't sound related, I'd be inclined to agree, considering the build succeeded and all. But I found this by doing a diff on output of
npm ls
on an older, working docker image against my current build (my builds donpm install
from a clean slate), and manually pinning things that had changed 1-by-1 until pinning[email protected]
fixed things. I've undone and redone this pinning a couple of times in isolation, and am sure it was the fix.1.7.1
is the version which causes my error.1.7.0
also causes same error.I'm now inspired to make my build process more robust, but any insight here would be appreciated.
My browserify (
^14.4.0
) options for node target are:The text was updated successfully, but these errors were encountered: