Closed ThaiLe-gt closed 1 year ago
Can you share the code that references occt-import-js in your app?
Hello Kovacsv!!!
I even can not import occt-import-js into my react-app.
this is my error for importing.
I'm not familiar with react, but maybe this can help: https://stackoverflow.com/questions/64557638/how-to-polyfill-node-core-modules-in-webpack-5
thank you. let me check it.
thank you. let me check it.
hello ThaiLe-gt! Have you solved this problem? Can you share some methods?
Hello npuzl! I haven't solved it yet but I switched to nodejs and it worked
Hello,
I had the same problem trying to integrate this repo into my React-TS application.
The following Code-Sandbox-Project however helped me realizing it: https://codesandbox.io/s/convert-step-file-to-glb-with-three-js-occt-import-js-v0-3-5hk66o?file=/src/StepLoader.js
Hope this helps anybody searching for a solution.
PS: Regarding the initial questioned error. I think npm i path
could fix the problem.
Here is my solution, please refer to it.
path-browserify
npm install path-browserify
resolve: {
fallback: {
fs: false,
perf_hooks: false,
os: false,
worker_threads: false,
crypto: false,
stream: false,
path: require.resolve('path-browserify'),
},
},
Hello Kovacsv!! I had an issue when I imported occt-import-js to my react app. Do you have any idea to solve this issue? Thank you in advance!![image](https://user-images.githubusercontent.com/52776227/177128324-cd3b921c-0e66-4d31-becf-2f0cf01acf43.png)