Dependencies were not successfully installed due to error:
Command failed: npm install <package> zsh:1: command not found: npm
For any failed npm installs above, run each listed install command manually from the root of this Editor workspace.
I tried to use exec
to do npm install <package>
it failed with the above issue. I dived into the Editor source code and found it has a EditorProcess
to run the similar thing. However, I have to have editor object to use it.
I also found there was a package called fix-path
which might be a potential solution to solve the PATH
issue but in the Editor, it threw the following issue when I use the library.
/Applications/BabylonJS Editor.app/Contents/Resources/app.asar/build/src/renderer/editor/editor.js:1421 Error
[ERR_REQUIRE_ESM]: Must use import to load ES Module: <path>
require() of ES modules is not supported.
require() of <path/index.js> from <path> is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Does anyone have the clues about solving these problems? Thank you.