geert-janklaps / generator-btp-diagram-icons

Generate SAP Business Technology Platform diagram icons
MIT License
11 stars 2 forks source link

Cannot find module '/opt/homebrew/lib/node_modules/generator-btp-diagram-icons/node_modules/@ui5/webcomponents-icons-tnt/dist/generated/assets/SAP-icons-TNT.json' #3

Closed mikhail-gorbunov closed 1 year ago

mikhail-gorbunov commented 1 year ago

While installing the bhp icons faced an issue: "Cannot find module '/opt/homebrew/lib/node_modules/generator-btp-diagram-icons/node_modules/@ui5/webcomponents-icons-tnt/dist/generated/assets/SAP-icons-TNT.json'" As a result, nothing was installed.

image
hschaefer123 commented 1 year ago

Hi,

same for me on mac, but you can fix it locally:

1) Check out the project locally 2) Use cmd npm link 3) Use cmd yo btp-diagram-icons

"scripts": {
    ...
    "local:link": "npm link",
    "local:start": "yo btp-diagram-icons"
  },

Using it this way, the libs and icons are created relatively to your checkout path.

If you want to use the latest icons you can update package.json deps to:

"@ui5/webcomponents-icons": "^1.12.2",
"@ui5/webcomponents-icons-business-suite": "^1.12.2",
"@ui5/webcomponents-icons-tnt": "^1.12.2",

but you to adopt new icon version dirs index.js lin 110-

const sapicons = require("@ui5/webcomponents-icons/dist/generated/assets/v5/SAP-icons.json");
const tnticons = require("@ui5/webcomponents-icons-tnt/dist/generated/assets/v3/SAP-icons-TNT.json");
const businesssuiteicons = require("@ui5/webcomponents-icons-business-suite/dist/generated/assets/v2/SAP-icons-business-suite.json");

Best regards Holger

geert-janklaps commented 1 year ago

Just published a new version to NPM, containing the latest webcomponents and fixing this path issue. Can you try it out?