_sorry, not looking for bugs. was just running some scenarios with: https://github.com/standard-things/esm/issues/468_
esm v3.0.49
node v10.4.0
I'm guessing it's because of the new named exports of 'cjs' build-in modules in node 10? Not sure.
repro
import fs from './foo';
// foo.js
module.exports = require('fs');
or
import fs from 'fs';
export default fs;
TypeError: 'getOwnPropertyDescriptor' on proxy: trap returned descriptor for property 'constants' that is incompatible with the existing property in the proxy target
at Function.keys (<anonymous>)
at formatValue (util.js:498:21)
at inspect (util.js:328:10)
at formatValue (util.js:467:31)
at formatProperty (util.js:1051:11)
at formatObject (util.js:791:17)
at formatValue (util.js:714:18)
at inspect (util.js:328:10)
sorry, not looking for bugs. was just running some scenarios with
No, please keep it up. All this stuff helps.
I'm guessing it's because of the new named exports of 'cjs' build-in modules in node 10? Not sure.
Not in this case. In this case it's because I broke a proxy assumption. It seems non-configurable and non-extensible properties must return the same value of the descriptor from a getOwnPropertyDescriptor trap and I was returning a wrapped value.
Update:
v3.0.50 is released :tada:
Just updated to 3.1.0 and now I'm getting this error too.
TypeError: 'getOwnPropertyDescriptor' on proxy: trap returned descriptor for property 'arguments' that is incompatible with the existing property in the proxy target
at /home/ayrton/Documents/ayyo-websocket/node_modules/esm/esm.js:1
at module.exports.$.inited.$.module.utilSilent (/home/ayrton/Documents/ayyo-websocket/node_modules/esm/esm.js:1)
at Object.<anonymous> (/home/ayrton/Documents/ayyo-websocket/node_modules/esm/esm.js:1)
at e (/home/ayrton/Documents/ayyo-websocket/node_modules/esm/esm.js:1)
at module.exports.$.inited.$.module.utilGetProxyDetails (/home/ayrton/Documents/ayyo-websocket/node_modules/esm/esm.js:1)
at module.exports.$.inited.$.module.utilUnwrapProxy (/home/ayrton/Documents/ayyo-websocket/node_modules/esm/esm.js:1)
at Object.<anonymous> (/home/ayrton/Documents/ayyo-websocket/node_modules/esm/esm.js:1)
at r (/home/ayrton/Documents/ayyo-websocket/node_modules/esm/esm.js:1)
at /home/ayrton/Documents/ayyo-websocket/node_modules/esm/esm.js:1
at /home/ayrton/Documents/ayyo-websocket/node_modules/esm/esm.js:1
TypeError: Cannot read property 'Script' of undefined
at Object.<anonymous> (/home/ayrton/Documents/ayyo-websocket/node_modules/esm/esm.js:1)
at Object.<anonymous> (/home/ayrton/Documents/ayyo-websocket/node_modules/esm/esm.js:1)
at Proxy.<anonymous> (/home/ayrton/Documents/ayyo-websocket/node_modules/esm/esm.js:1)
at Object.onceWrapper (events.js:276:13)
at process.emit (events.js:193:15)
at process.EventEmitter.emit (domain.js:441:20)
at process.topLevelDomainCallback (domain.js:120:23)
hey @FallingSnow
do you have a simple repro for this? generally it's also better to open a new issue for tracking purposes.
Just downgraded to [email protected] for the time being. If I have the time/need I'll come back and try to put a repo together for the issue on 3.1.0.
@FallingSnow although a repro repo would be ideal, it doesn't necessarily need to be one if the repro steps are simple enough.
@FallingSnow Related patch https://github.com/standard-things/esm/commit/2a4bd4f3aa7206c77b725fa89e2fc109fcbb6faf.
Most helpful comment
No, please keep it up. All this stuff helps.
Not in this case. In this case it's because I broke a proxy assumption. It seems non-configurable and non-extensible properties must return the same value of the descriptor from a
getOwnPropertyDescriptortrap and I was returning a wrapped value.Update:
v3.0.50 is released :tada: