Extension failed to load. Cannot find module...

10 views
Skip to first unread message

Michael Faughn

unread,
Jul 6, 2023, 7:15:48 PM7/6/23
to StarUML
I am new to node.js.  I was trying to figure out how to have access to the strftime module in my extension code.  I installed nvm and then installed node.js v16.50 because that is what StarUML is using.  Then I did `npm install strftime`.  

Now, when I try to start I get errors (shown in attached image and attached log).  I also see that my extensions dir now contains a `node_modules` dir that contains a `strftime` dir, which in turn contains several files.  If I remove the `node_modules` dir from the `extensions` dir then the problem goes away.

So, how can I use modules that aren't part of the built-in node.js modules but that can be installed with npm?


starUML.log
starUML_loadModules.png

StarUML

unread,
Jul 6, 2023, 9:44:53 PM7/6/23
to StarUML
Hi,

Extension cannot load NPM module, so you have to bundle them into a single js file using Webpack.

Thanks,

2023년 7월 7일 금요일 오전 8시 15분 48초 UTC+9에 michael...@nist.gov님이 작성:
Reply all
Reply to author
Forward
0 new messages