question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Linux] Error when create new bot, node not found

See original GitHub issue

Hi, I want to create a new Node Core Bot with Language bit I get an error: Error calling npm to fetch template. Please ensure that node and npm are installed and available on your system. Full error message: Command failed with ENOENT: npm root -g --prefix /home/XXX/BotFrameworkComposer/.yo-repository --loglevel error spawnSync npm ENOENT I’m using Ubuntu 18.04. I have check my node and npm version: npm -v 6.14.11 node -v v14.8.0 but it is still failing. What can I do?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
tonyanzianocommented, Jul 20, 2021

@AdriVazquez @arotena How do you both normally start your .AppImage apps? Do you double click the shortcut after making it executable?

If so, please try starting your Composer installation via the terminal as a workaround.

  1. Open a terminal tab
  2. Navigate to where Composer is installed
  3. run the command ./BotFramework-Composer-<version>-linux-x86_64.AppImage

It seems like there might be some strange case in which double clicking the app to start it might not forward the correct binaries references like npm and node – where as running via the terminal does.

1reaction
hatpickcommented, Jul 23, 2021

@arotena the reason you have the original issue is that node is not on your PATH (env variable) when you run Composer normally. In order for nvm to manage multiple versions of node, it needs to keep the executables under .nvm and then add it to current user profile PATH. Ubuntu runs AppImage apps in a different context that does not load your user bash profile. So as a result it’s not aware of the path that nvm uses for executables. To fix that, you need to create a couple of symlinks to make node and npm available for all users:

sudo ln -s `which node` "/usr/local/bin/node"
sudo ln -s `which npm` "/usr/local/bin/npm"

After running these, you can simply double click the app to open.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SET: not found NODE JS - Stack Overflow
js in my package.json file. But the environment not change and still run in the development mode. It also throw error like sh:...
Read more >
How to resolve 'node' is not recognized as an internal or ...
Open the Environment Variables option in your Control Panel. · Select the variable named Path. · Restart the command prompt again and now...
Read more >
[Solved] Error: Cannot find module 'node:events' - ItsJavaScript
The Error: Cannot find module 'node:events' occurs if you are not using the latest version of node.js 16.6.0 or above and developing the...
Read more >
node-fetch - npm
A light-weight module that brings Fetch API to node.js. ... Start using node-fetch in your project by running `npm i node-fetch`.
Read more >
Node.js runs fine with alias but not /usr/bin/node? - Super User
js it gives me an error about a module. It seems whatever dependency that one of my requires uses is incompatible with an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found