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
When trying to upgrade my project to webpack 5, it seems to fail with ts-tranform-graphql-tag.
(node:1904777) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.
BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.
(node:1904777) [DEP_WEBPACK_MODULE_ID] DeprecationWarning: Module.id: Use new ChunkGraph API
✖ 「wdm」: ModuleNotFoundError: Module not found: Error: Can't resolve './graphql' in '/home/dori/Projects/Work/Project/v3/client/node_modules/graphql'
Did you mean 'graphql.js'?
BREAKING CHANGE: The request './graphql' failed to resolve only because it was resolved as fully specified
(probably because the origin is a '*.mjs' file or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
at /home/dori/Projects/Work/Project/v3/client/node_modules/webpack/lib/Compilation.js:1478:28
at /home/dori/Projects/Work/Project/v3/client/node_modules/webpack/lib/NormalModuleFactory.js:648:13
at eval (eval at create (/home/dori/Projects/Work/Project/v3/client/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
at /home/dori/Projects/Work/Project/v3/client/node_modules/webpack/lib/NormalModuleFactory.js:233:22
at eval (eval at create (/home/dori/Projects/Work/Project/v3/client/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
at /home/dori/Projects/Work/Project/v3/client/node_modules/webpack/lib/NormalModuleFactory.js:357:22
at /home/dori/Projects/Work/Project/v3/client/node_modules/webpack/lib/NormalModuleFactory.js:116:11
at /home/dori/Projects/Work/Project/v3/client/node_modules/webpack/lib/NormalModuleFactory.js:577:24
at /home/dori/Projects/Work/Project/v3/client/node_modules/webpack/lib/NormalModuleFactory.js:715:10
at finishResolved (/home/dori/Projects/Work/Project/v3/client/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:278:11)
✖ 「wdm」: resolve './graphql' in '/home/dori/Projects/Work/Project/v3/client/node_modules/graphql'
using description file: /home/dori/Projects/Work/Project/v3/client/node_modules/graphql/package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
using description file: /home/dori/Projects/Work/Project/v3/client/node_modules/graphql/package.json (relative path: ./graphql)
Field 'browser' doesn't contain a valid alias configuration
/home/dori/Projects/Work/Project/v3/client/node_modules/graphql/graphql doesn't exist
Using ts-tranform-graphql-tag 0.2.1
I tried adding fullySpecified: false as recommended in this thread
{test: /\.tsx?$/,exclude: /node_modules/,resolve: {// FIXME: graphql resolution// https://github.com/graphql/graphql-js/issues/2721fullySpecified: false,},use: [{loader: "babel-loader",options: {presets: ["@babel/preset-typescript","@babel/preset-react"],// used to auto-generate proptypes from typescript in dev modeplugins: [["babel-plugin-typescript-to-proptypes",{comments: true,strict: true},],],},},{loader: "ts-loader",options: {getCustomTransformers: ()=>({before: [getTransformer()]}),// compile AST queries},},],},
Which gives me different errors:
(node:1908967) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.
BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.
(node:1908967) [DEP_WEBPACK_MODULE_ID] DeprecationWarning: Module.id: Use new ChunkGraph API
✖ 「wdm」: ModuleNotFoundError: Module not found: Error: Can't resolve './version' in '/home/dori/Projects/Work/Project/v3/client/node_modules/graphql'
Did you mean 'version.js'?
BREAKING CHANGE: The request './version' failed to resolve only because it was resolved as fully specified
(probably because the origin is a '*.mjs' file or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
at /home/dori/Projects/Work/Project/v3/client/node_modules/webpack/lib/Compilation.js:1478:28
at /home/dori/Projects/Work/Project/v3/client/node_modules/webpack/lib/NormalModuleFactory.js:648:13
at eval (eval at create (/home/dori/Projects/Work/Project/v3/client/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
at /home/dori/Projects/Work/Project/v3/client/node_modules/webpack/lib/NormalModuleFactory.js:233:22
at eval (eval at create (/home/dori/Projects/Work/Project/v3/client/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
at /home/dori/Projects/Work/Project/v3/client/node_modules/webpack/lib/NormalModuleFactory.js:357:22
at /home/dori/Projects/Work/Project/v3/client/node_modules/webpack/lib/NormalModuleFactory.js:116:11
at /home/dori/Projects/Work/Project/v3/client/node_modules/webpack/lib/NormalModuleFactory.js:577:24
at /home/dori/Projects/Work/Project/v3/client/node_modules/webpack/lib/NormalModuleFactory.js:715:10
at finishResolved (/home/dori/Projects/Work/Project/v3/client/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:278:11)
✖ 「wdm」: resolve './version' in '/home/dori/Projects/Work/Project/v3/client/node_modules/graphql'
using description file: /home/dori/Projects/Work/Project/v3/client/node_modules/graphql/package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
using description file: /home/dori/Projects/Work/Project/v3/client/node_modules/graphql/package.json (relative path: ./version)
Field 'browser' doesn't contain a valid alias configuration
/home/dori/Projects/Work/Project/v3/client/node_modules/graphql/version doesn't exist
When trying to upgrade my project to webpack 5, it seems to fail with ts-tranform-graphql-tag.
Using ts-tranform-graphql-tag 0.2.1
I tried adding
fullySpecified: false
as recommended in this threadWhich gives me different errors:
This might be related to this issue: graphql/graphql-js#2721
The text was updated successfully, but these errors were encountered: