opencascade.js icon indicating copy to clipboard operation
opencascade.js copied to clipboard

yarn serve fails: depency not found node_modules/opencascade.js/dist/opencascade.full.wasm

Open Trophime opened this issue 3 years ago • 1 comments

Hi, I'm trying to use opencascade.js to view some brep files in a web service. I've tried to use files from nuxt/vue template

When adding opencascade.js with yarn, I have a warning:

 [email protected]" has unmet peer dependency "ws@^8.5.0".

When starting the web service:

vscode@calcul22:/workspaces/python_magnetdb/web$ yarn serve
yarn run v1.22.19
$ vue-cli-service serve
INFO  Starting development server...
 98% after emitting CopyPlugin
 
 ERROR  Failed to compile with 1 error                                                                                                                                    3:05:44 PM
 
This dependency was not found:
 
* a in ./node_modules/opencascade.js/dist/opencascade.full.wasm

To install it, you can run: npm install --save a

Is there a specific way to install opencascade.js with yarn? Shall I follow advice from the error message?

I'm really not familiar with yarn/npm stuff so Thanks for any help, Best

Trophime avatar Jun 29 '22 15:06 Trophime

Hi,

it's probably best to download a fresh copy of the starter template. Then to run the application in development mode:

cd ocjs-create-nuxt-app
npm install
npm run dev

Then go to http://localhost:37381/.

The starter templates are currently shipped with lockfiles for npm, so it's safest to use npm instead of yarn (they do the exact same thing for the scope of this example).

If you want to create / deploy a production version, use

npm run build

Check the docs for Create-Nuxt-App for further info.

donalffons avatar Jun 30 '22 11:06 donalffons