Closed KINFOO closed 2 years ago
@KINFOO Thanks. I will investigate.
Thanks @microshine for quick changes.
@KINFOO Please try the 2.3.2
version.
Hi,
Upgrading to 2.3.2
using
$ rm -fr node_modules
$ yarn add @peculiar/fortify-webcomponents-react@2.3.2
$ yarn
Running application, unfortunately I get:
Failed to compile.
SyntaxError: /client/node_modules/@peculiar/fortify-webcomponents/dist/esm-es5/fortify_api-c262da91.js: Identifier '__awaiter' has already been declared. (1390:9)
1388 | PERFORMANCE OF THIS SOFTWARE.
1389 | ***************************************************************************** */
> 1390 | function __awaiter(thisArg, _arguments, P, generator) {
| ^
1391 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1392 | return new (P || (P = Promise))(function (resolve, reject) {
1393 | function fulfilled(value) { try {
assets by path static/js/*.js 9.03 MiB
assets by chunk 5.24 MiB (id hint: vendors)
asset static/js/vendors-node_modules_date-io_moment_build_index_esm_js-node_modules_fortawesome_free-solid-sv-a5267b.chunk.js 3.72 MiB [emitted] (id hint: vendors) 1 related asset
asset static/js/vendors-node_modules_peculiar_fortify-webcomponents_dist_esm-es5_certification_request-1ab6cf4c_js.chunk.js 305 KiB [emitted] (id hint: vendors) 1 related asset
+ 23 assets
+ 100 assets
assets by path static/media/*.svg 121 KiB
assets by info 62.8 KiB [immutable] 58 assets
assets by chunk 25.9 KiB (auxiliary name: main)
asset static/media/sw-wave.222b0b8418baf5caa3999f704b892611.svg 5.61 KiB [emitted] (auxiliary name: main)
+ 17 assets
+ 38 assets
asset asset-manifest.json 38.3 KiB [emitted]
asset index.html 1.82 KiB [emitted]
orphan modules 3.78 MiB [orphan] 6044 modules
runtime modules 30.6 KiB 16 modules
built modules 7.29 MiB (javascript) 62.8 KiB (asset) [built]
modules by path ./node_modules/ 6.8 MiB 969 modules
modules by path ./src/ 506 KiB (javascript) 62.8 KiB (asset)
javascript modules 491 KiB
cacheable modules 491 KiB 168 modules
./src/Img/ lazy ^\.\/.*$ namespace object 160 bytes [built] [code generated]
./src/Img/Components/ lazy ^\.\/.*$ namespace object 160 bytes [built] [code generated]
asset modules 14.8 KiB (javascript) 62.8 KiB (asset)
modules by path ./src/Img/*.svg 2.38 KiB (javascript) 62.8 KiB (asset) 58 modules
modules by path ./src/Img/*.png 12.4 KiB
./src/Img/warning_generic.png 10.4 KiB [built] [code generated]
./src/Img/userAvatar.png 2.08 KiB [optional] [built] [code generated]
./util.inspect (ignored) 15 bytes [built] [code generated]
WARNING in src/Utils/routes.tsx
Line 84:1: Assign array to a variable before exporting as module default import/no-anonymous-default-export
ERROR in ./node_modules/@peculiar/fortify-webcomponents/dist/esm-es5/fortify_api-c262da91.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /client/node_modules/@peculiar/fortify-webcomponents/dist/esm-es5/fortify_api-c262da91.js: Identifier '__awaiter' has already been declared. (1390:9)
1388 | PERFORMANCE OF THIS SOFTWARE.
1389 | ***************************************************************************** */
> 1390 | function __awaiter(thisArg, _arguments, P, generator) {
| ^
1391 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1392 | return new (P || (P = Promise))(function (resolve, reject) {
1393 | function fulfilled(value) { try {
at Parser._raise (/client/node_modules/@babel/parser/lib/index.js:476:17)
at Parser.raiseWithData (/client/node_modules/@babel/parser/lib/index.js:469:17)
at Parser.raise (/client/node_modules/@babel/parser/lib/index.js:430:17)
at ScopeHandler.checkRedeclarationInScope (/client/node_modules/@babel/parser/lib/index.js:1720:12)
at ScopeHandler.declareName (/client/node_modules/@babel/parser/lib/index.js:1686:12)
at Parser.registerFunctionStatementId (/client/node_modules/@babel/parser/lib/index.js:14910:16)
at Parser.parseFunction (/client/node_modules/@babel/parser/lib/index.js:14890:12)
at Parser.parseFunctionStatement (/client/node_modules/@babel/parser/lib/index.js:14495:17)
at Parser.parseStatementContent (/client/node_modules/@babel/parser/lib/index.js:14157:21)
at Parser.parseStatement (/client/node_modules/@babel/parser/lib/index.js:14113:17)
@ ./node_modules/@peculiar/fortify-webcomponents/dist/esm-es5/peculiar-fortify-enrollment.entry.js 145:0-130 155:27-43 158:12-30 161:12-34 164:12-25 168:12-24 171:12-23 182:24-51 187:24-46 342:25-29 346:39-55 346:62-78 348:35-51 417:47-57
@ ./node_modules/@peculiar/fortify-webcomponents/dist/esm-es5/ lazy ^\.\/.*\.entry\.js$ include: \.entry\.js$ exclude: \.system\.entry\.js$ namespace object ./peculiar-fortify-enrollment.entry.js
@ ./node_modules/@peculiar/fortify-webcomponents/dist/esm-es5/index-7910a682.js 2365:9-2371:37
@ ./node_modules/@peculiar/fortify-webcomponents/dist/esm-es5/loader.mjs 1:0-57 7:11-24
@ ./node_modules/@peculiar/fortify-webcomponents/loader/index.mjs 16:0-43 16:0-43
@ ./node_modules/@peculiar/fortify-webcomponents-react/dist/esm/index.js 8:0-94 12:2-16 12:30-50
@ ./src/Components/authorize/operationsAuthorizeContainer.tsx 2:0-84 9:30-57
@ ./src/App.tsx 22:51-110
@ ./src/index.tsx 4:0-24 9:33-36
Many thanks for addressing this so fast
@KINFOO I use the codesanbox and CRA template to test the component. All works as expected.
Could you share more context about it?
Hi @donskov
I haven't been able to reproduce using codesanbox
But with this code, provided with package.json
& yarn.lock
: I am able to reproduce.
( It also fail using npm
)
Tell me if you manage to reproduce
@KINFOO Could you please create a repo to test your case?
Yes and you're now collaborator at https://github.com/KINFOO/fortify_2.3.2
@KINFOO Looks like it was the problem in our builder. Try to use the 3.0.0
version. I needed to upgrade to a major version as the output files have changed a bit.
My good sir,
It works like a charm
@KINFOO Thank you for the report. Although it's weird. We also use these components at home, but apparently, everything depends on the bundler.
Hi
Context
I am using
@peculiar/fortify-webcomponents-react
I can renderPeculiarFortifyCertificates
using version 0.2.38Versions
node
: v16.13.1webpack
: 5.70.0Problem
I am unable to render
PeculiarFortifyCertificates
using version 2.3.1 ( I read documentation )What am I doing wrong ?
Details
Code for
0.2.38
✨ It renders ✨
Code for
2.3.1
😒 It does not render 😒
Stack trace
In the console I have
and also