Open oliverlj opened 4 years ago
I don't think @babel/plugin-syntax-bigint can help us here. That allows babel to parse the code, but it's not babel that is failing here, it's webpack.
Webpack uses acorn as its parser, and there does appear to be an acorn-bigint plugin that can parse bigint, but unforunately webpack doesn't let you add plugins to acorn. See for example https://github.com/webpack/webpack/issues/10216#issuecomment-573329749
However, from some quick testing it looks like the newest webpack builds in support for bigint. It should be enough for us to upgrade the version of webpack that ember-auto-import is using. We have been pinned to a slightly older version due to an npm bug that breaks users of webpack after 4.29.0 (see https://github.com/ef4/ember-auto-import/issues/192#issuecomment-466458116). But it's probably time to just try jumping ahead and hope the dependencies have shuffled enough that the npm bug doesn't bite much.
Let's see if we can release https://github.com/ef4/ember-auto-import/pull/299
I have fixed the webpack dependency in my yarn.lock => this is working. ember build as well
now if I build the production env, the build is fine, but when i ask for the route I got this error :
router.js:1250 Error while processing route: savings.saving Cannot convert a BigInt value to a number TypeError: Cannot convert a BigInt value to a number
at Math.pow (<anonymous>)
at Object.<anonymous> (http://simulator.services.localhost/assets/vendor-dbb21d81069a221a893d39be61d69783.js:18250:131)
at o (http://simulator.services.localhost/assets/vendor-dbb21d81069a221a893d39be61d69783.js:18060:13)
at Object.<anonymous> (http://simulator.services.localhost/assets/vendor-dbb21d81069a221a893d39be61d69783.js:18228:14)
at o (http://simulator.services.localhost/assets/vendor-dbb21d81069a221a893d39be61d69783.js:18060:13)
at Object.<anonymous> (http://simulator.services.localhost/assets/vendor-dbb21d81069a221a893d39be61d69783.js:18351:7)
at o (http://simulator.services.localhost/assets/vendor-dbb21d81069a221a893d39be61d69783.js:18060:13)
at s.callback (http://simulator.services.localhost/assets/vendor-dbb21d81069a221a893d39be61d69783.js:18071:305)
at s.exports (http://simulator.services.localhost/assets/vendor-dbb21d81069a221a893d39be61d69783.js:19:21)
at s._reify (http://simulator.services.localhost/assets/vendor-dbb21d81069a221a893d39be61d69783.js:22:35)
(anonymous) @ router.js:1250
error @ router.js:1187
S @ router.js:1347
c.triggerEvent @ router.js:194
t.trigger @ router_js.js:496
c.transitionDidError @ router.js:216
(anonymous) @ router_js.js:288
b @ rsvp.js:494
y @ rsvp.js:477
p @ rsvp.js:413
t.invoke @ backburner.js:373
t.flush @ backburner.js:263
t.flush @ backburner.js:470
r._end @ backburner.js:1044
_boundAutorunEnd @ backburner.js:684
Promise.then (async)
n @ backburner.js:29
flush @ index.js:43
r._scheduleAutorun @ backburner.js:1263
r._end @ backburner.js:1054
_boundAutorunEnd @ backburner.js:684
Promise.then (async)
n @ backburner.js:29
flush @ index.js:43
r._scheduleAutorun @ backburner.js:1263
r._ensureInstance @ backburner.js:1251
r.schedule @ backburner.js:820
e.schedule @ index.js:371
waitForDOMReady @ application.js:431
init @ application.js:337
r @ index.js:428
g @ core_object.js:98
e.create @ core_object.js:638
(anonymous) @ app-boot.js:3
waiter-manager.js:40 Uncaught (in promise) TypeError: Cannot convert a BigInt value to a number
at Math.pow (<anonymous>)
at Object.<anonymous> (waiter-manager.js:40)
at o (waiter-manager.js:40)
at Object.<anonymous> (waiter-manager.js:40)
at o (waiter-manager.js:40)
at Object.<anonymous> (waiter-manager.js:40)
at o (waiter-manager.js:40)
at s.callback (waiter-manager.js:40)
at s.exports (loader.js:106)
at s._reify (loader.js:143)
How can I debug this ?
error in production was beacuse of ie11 in targets for production build. ticket can be close, i saw no issue with webpack 4.43
I'm trying to add bigint-money dependencies but i got thier error :
I saw @babel/plugin-syntax-bigint could do the job but i don't know how to configure this plugin ?