eclipse-emfcloud/coffee-editor

Issue building frontend when building packages

aparedes1204 opened this issue · 4 comments

I'm tryng to run the coffee editor on Windows to test it and try undertanding its structure better. I followed the steps mentioned in the readme (installing prerequisites, building backend, copying backend...). However, when building the fronted although the first 3 steps (Resolving packages, fetching them and linking dependencies) are completed without any issue the last step, building the fresh packages fails with in the following error:

lerna ERR! execute callback with error
lerna ERR! Error: Command failed: yarn run prepare
lerna ERR! warning coffee-workflow-analyzer-editor@0.7.0: The engine "vscode" appears to be invalid.
lerna ERR! warning coffee-workflow-analyzer-editor@0.7.0: The engine "vscode" appears to be invalid.
lerna ERR! warning coffee-workflow-analyzer-editor@0.7.0: The engine "vscode" appears to be invalid.
lerna ERR! warning coffee-workflow-analyzer-editor@0.7.0: The engine "vscode" appears to be invalid.
lerna ERR! warning coffee-workflow-analyzer-editor@0.7.0: The engine "vscode" appears to be invalid.
lerna ERR!  ERROR  The following files have the same case insensitive path, which isn't supported by the VSIX format:
lerna ERR!   - extension/node_modules/semver/bin/semver.js
lerna ERR!   - extension/node_modules/semver/bin/semver.js
lerna ERR!   - extension/node_modules/semver/CHANGELOG.md
lerna ERR!   - extension/node_modules/semver/CHANGELOG.md
lerna ERR!   - extension/node_modules/semver/LICENSE
lerna ERR!   - extension/node_modules/semver/LICENSE
...

And a bunch more file-paths. I've attached the whole log file.

Any idea of what may cause this issue? I'm using node 16.16.0 and I tryed downgrading it, but by doing so I had an issue that aparently is solved with a newer version.

lerna-debug.log

I'm having the same problem when building the frontend on Ubuntu (gitpod/workspace-full docker image) with node v16.15.1

That looks weird. I will try to reproduce.
Just to be extra sure, you are building of latest master?

I was building of previous commit. However, with the latest one the problem persists

So think I may have found the solution.. Problem is in the coffee-workflow-analyzer-editor extension which runs the 'package' script from 'prepare'. This effectively means that 'package' is being run twice, and the second time it finds duplicate paths.

To fix the problem, edit the file web/coffee-workflow-analyzer-editor/package.json and change line 39 to remove the yarn package from the 'prepare' script definition:

Original package.json scripts definition:

  "scripts": {
    "prepare": "yarn clean && yarn build && yarn package",    <--- REMOVE yarn package FROM THIS LINE
    "clean": "rimraf lib",
    "lint": "eslint -c .eslintrc.js --ext .ts,.tsx ./src",
    "build": "tsc -b && yarn run lint",
    "watch": "tsc -b -w",
    "package": "vsce package && copyfiles coffee-workflow-analyzer-editor-0.7.0.vsix ../browser-app/plugins/"
  },

New definition:

  "scripts": {
    "prepare": "yarn clean && yarn build",     <--- AFTER EDIT
    "clean": "rimraf lib",
    "lint": "eslint -c .eslintrc.js --ext .ts,.tsx ./src",
    "build": "tsc -b && yarn run lint",
    "watch": "tsc -b -w",
    "package": "vsce package && copyfiles coffee-workflow-analyzer-editor-0.7.0.vsix ../browser-app/plugins/"
  },

Works for me, and I can now build and run the demo:)