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
Using name mangling results in much smaller output which is highly desirable especially when running the graphql server in AWS Lambda to reduce cold start time.
But using uglify with mangle=true results in this error:
module initialization error: Error
Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.
https://yarnpkg.com/en/docs/selective-version-resolutions
Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.
at n.a (/var/task/index.js:1:156141)
at f (/var/task/index.js:1:3835)
at d (/var/task/index.js:1:3756)
at _ (/var/task/index.js:1:4392)
at n.q (/var/task/index.js:1:2738)
at new o (/var/task/index.js:1:25040)
at o (/var/task/index.js:1:25008)
at Object.n.a.r (/var/task/index.js:1:36681)
at t (/var/task/index.js:1:447)
at Object.<anonymous> (/var/task/index.js:1:83640)
The text was updated successfully, but these errors were encountered:
@BerndWessels can you share more information about what version of the library you're using? This issue was presumed fixed in the last release, but it would be great to get your confirmation of this.
I just want to point out to others who run into this error that the fix only applies when NODE_ENV=production. If you are mangling your code in other environments (such as staging) then it will still fail.
Using name mangling results in much smaller output which is highly desirable especially when running the graphql server in AWS Lambda to reduce cold start time.
But using
uglify
withmangle=true
results in this error:The text was updated successfully, but these errors were encountered: