Open KeM1aL opened 2 weeks ago
Did you find a fix? @KeM1aL
✘ [ERROR] /home/vanyasav/WebstormProjects/angular-reown-example/node_modules/@reown/appkit/dist/esm/exports/index.js: The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error. (2:42)
1 | import { AppKit } from '../src/client.js';
> 2 | import packageJson from '../package.json' assert { type: 'json' };
| ^
3 | import { CoreHelperUtil } from '@reown/appkit-core';
4 | // -- Views ------------------------------------------------------------
5 | export * from '@reown/appkit-scaffold-ui'; [plugin angular-vite-optimize-deps]
This error came from the "onLoad" callback registered here:
node_modules/@angular/build/src/builders/dev-server/vite-server.js:505:22:
505 │ build.onLoad({ filter: /\.[cm]?js$/ }, async (args) => {
╵ ~~~~~~
at setup (/home/vanyasav/WebstormProjects/angular-reown-example/node_modules/@angular/build/src/builders/dev-server/vite-server.js:505:23)
at handlePlugins (/home/vanyasav/WebstormProjects/angular-reown-example/node_modules/vite/node_modules/esbuild/lib/main.js:1150:21)
at buildOrContextImpl (/home/vanyasav/WebstormProjects/angular-reown-example/node_modules/vite/node_modules/esbuild/lib/main.js:873:5)
at Object.buildOrContext (/home/vanyasav/WebstormProjects/angular-reown-example/node_modules/vite/node_modules/esbuild/lib/main.js:699:5)
at /home/vanyasav/WebstormProjects/angular-reown-example/node_modules/vite/node_modules/esbuild/lib/main.js:2032:68
at new Promise (<anonymous>)
at Object.context (/home/vanyasav/WebstormProjects/angular-reown-example/node_modules/vite/node_modules/esbuild/lib/main.js:2032:27)
at Object.context (/home/vanyasav/WebstormProjects/angular-reown-example/node_modules/vite/node_modules/esbuild/lib/main.js:1874:58)
at prepareEsbuildOptimizerRun (file:///home/vanyasav/WebstormProjects/angular-reown-example/node_modules/vite/dist/node/chunks/dep-DyBnyoVI.js:50861:33)
Link to minimal reproducible example
-
Summary
Change the import assert syntax to import with syntax to avoid enabling deprecated feature
node_modules/@reown/appkit/dist/esm/exports/index.js: The
assert
keyword in import attributes is deprecated and it has been replaced by thewith
keyword. You can enable thedeprecatedAssertSyntax: true
option in the import attributes plugin to suppress this error. (2:42)List of related npm package versions
"@reown/appkit": "^1.0.1"