signavio / BPMN-Sol

Compiler to convert BPMN 2.0 xml to solidity smart contract
Other
16 stars 4 forks source link

soljson.cwrap is not a function #7

Open arminshoughi opened 3 years ago

arminshoughi commented 3 years ago

Hi When i try to import it in my angular project i get this warning in terminal :

WARNING in ./~/ejs/lib/ejs.js
require.extensions is not supported by webpack. Use a loader instead.
@ ./~/bpmn-sol/dist/models/models.parsers.js 6:10-24
@ ./~/bpmn-sol/dist/models/models.controller.js
@ ./~/bpmn-sol/dist/index.js
@ ./src/app/modeler/modeler.component.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts

WARNING in ./~/ejs/lib/ejs.js
require.extensions is not supported by webpack. Use a loader instead.
@ ./~/bpmn-sol/dist/models/models.parsers.js 6:10-24
@ ./~/bpmn-sol/dist/models/models.controller.js
@ ./~/bpmn-sol/dist/index.js
@ ./src/app/modeler/modeler.component.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts

WARNING in ./~/ejs/lib/ejs.js
374:11-18 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

WARNING in ./~/ejs/lib/ejs.js
375:2-9 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

WARNING in ./~/lazy-debug-legacy/src/functions.js
62:15-40 Critical dependency: the request of a dependency is an expression

WARNING in ./~/lazy-debug-legacy/src/functions.js
87:8-28 Critical dependency: the request of a dependency is an expression

and get this error in browser :

Uncaught TypeError: soljson.cwrap is not a function

i read this issu but not worked for me :(

Matwog commented 3 years ago

@arminshoughi796 Which node version are you using in your project?

arminshoughi commented 3 years ago

@arminshoughi796 Which node version are you using in your project?

Latest version, 14. I tried to use another version like 10, 11 but still got same error.

Matwog commented 3 years ago

Latest version, 14. I tried to use another version like 10, 11 but still got same error.

Could you please try to remove the package and reinstall it to your project and run it at node v14.14.0 and confirm if you still get the error ?

arminshoughi commented 3 years ago

Latest version, 14. I tried to use another version like 10, 11 but still got same error.

Could you please try to remove the package and reinstall it to your project and run it at node v14.14.0 and confirm if you still get the error ?

I do that but again got a "soljson.cwrap is not a function" error again.

Matwog commented 3 years ago

I do that but again got a "soljson.cwrap is not a function" error again.

I will take a look this weekend. Hopefully I can help you resolve.

LiviuLvu commented 2 years ago

getting same error on: truffle compile

any news on this error? I tried node 8, 10, 12, 14, 16 in node 10 it does nothing the rest throw error: soljson.cwrap is not a function

LiviuLvu commented 2 years ago

getting same error on: truffle compile

any news on this error? I tried node 8, 10, 12, 14, 16 in node 10 it does nothing the rest throw error: soljson.cwrap is not a function

Update: changing the compiler to older version fixed the issue