# Problemas no npm ao executar o rfbrowser init

**URL:** <https://forum.robotframework.org/t/problemas-no-npm-ao-executar-o-rfbrowser-init/6489>\
**Category:** Browser\
**Created:** [18 November 2023 22:44 UTC](https://forum.robotframework.org/t/problemas-no-npm-ao-executar-o-rfbrowser-init/6489 "2023-11-18T22:44:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josiane](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@Josiane](https://forum.robotframework.org/u/Josiane)\
**Post date:** [18 November 2023 22:44 UTC](https://forum.robotframework.org/t/problemas-no-npm-ao-executar-o-rfbrowser-init/6489/1 "2023-11-18T22:44:58Z")

</div>

Boa noite pessoal!  
Gostaria de saber se alguém consegue me ajudar com este problema…  
Após instalar a biblioteca Browser, quando executo o rfbrowser init está retornando o seguinte problema:  
File “C:\Python312\Lib\subprocess.py”, line 571, in run  
raise CalledProcessError(retcode, process.args,  
subprocess.CalledProcessError: Command ‘[‘npm’, ‘-v’]’ returned non-zero exit status 1.

Acima tem a parte do erro específico (para facilitar), aqui abaixo vou colocar o retorno completo.  
$ rfbrowser init  
2023-11-18 19:33:02,936 [INFO] ==============================================================================================================  
2023-11-18 19:33:02,936 [INFO] Installing node dependencies…  
O sistema não pode encontrar o caminho especificado.  
2023-11-18 19:33:03,378 [INFO] Couldn’t execute npm. Please ensure you have node.js and npm installed and in PATH.See [https://nodejs.org/](https://nodejs.org/) for documentation  
2023-11-18 19:33:03,379 [INFO] ==============================================================================================================  
2023-11-18 19:33:03,381 [INFO] Traceback (most recent call last):  
File “C:\Python312\Lib\site-packages\Browser\entry.py”, line 324, in init  
\_rfbrowser\_init(skip\_browsers, silent\_mode, with\_deps, browser)  
File “C:\Python312\Lib\site-packages\Browser\entry.py”, line 131, in \_rfbrowser\_init  
\_check\_npm()  
File “C:\Python312\Lib\site-packages\Browser\entry.py”, line 123, in \_check\_npm  
raise exception  
File “C:\Python312\Lib\site-packages\Browser\entry.py”, line 111, in \_check\_npm  
subprocess.run(  
File “C:\Python312\Lib\subprocess.py”, line 571, in run  
raise CalledProcessError(retcode, process.args,  
subprocess.CalledProcessError: Command ‘[‘npm’, ‘-v’]’ returned non-zero exit status 1.

Agradeço desde já.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [18 November 2023 23:11 UTC](https://forum.robotframework.org/t/problemas-no-npm-ao-executar-o-rfbrowser-init/6489/2 "2023-11-18T23:11:34Z")

</div>

Josiane, the communication here is in English.

But I can already say something:

- Your problem is related to the rfbrowser installer not finding NodeJS `npm`  
(`npm` is the command to install and run node modules)
- Other thing might be the version of Python. I don’t know if Browser is compatible with Python 3.12
- You should move this message to the Topic #Browser

Boa Sorte

---

<div class="post-metadata">

**Author:** ![Josiane](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@Josiane](https://forum.robotframework.org/u/Josiane)\
**Post date:** [18 November 2023 23:24 UTC](https://forum.robotframework.org/t/problemas-no-npm-ao-executar-o-rfbrowser-init/6489/3 "2023-11-18T23:24:35Z")

</div>

Thanks. I Will try The indicated solutions.

---

<div class="post-metadata">

**Author:** ![Josiane](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@Josiane](https://forum.robotframework.org/u/Josiane)\
**Post date:** [21 November 2023 17:27 UTC](https://forum.robotframework.org/t/problemas-no-npm-ao-executar-o-rfbrowser-init/6489/4 "2023-11-21T17:27:10Z")

</div>

Good afternoon!  
I redid the installation of node and python, both with compatible versions, but the error still persists.  
Python is installed in the c: folder, outside the programs folder and node is installed in the c://programas folder.  
I tried to put them both on the same route (just c:// or just c://programs) but the same thing persists. Do you have any other instructions that could help me please? Thanks.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [21 November 2023 20:51 UTC](https://forum.robotframework.org/t/problemas-no-npm-ao-executar-o-rfbrowser-init/6489/5 "2023-11-21T20:51:15Z")

</div>

I am not an expert on Browser. Maybe @mkorpela or @aaltat can help you.

Are you sure Browser is compatible with Python 3.12?

---

<div class="post-metadata">

**Author:** ![Josiane](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@Josiane](https://forum.robotframework.org/u/Josiane)\
**Post date:** [21 November 2023 22:14 UTC](https://forum.robotframework.org/t/problemas-no-npm-ao-executar-o-rfbrowser-init/6489/6 "2023-11-21T22:14:56Z")

</div>

Yes it is compatible. Thank you for your help. @mkorpela or @aaltat Can you help me with this problem please?

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [21 November 2023 23:41 UTC](https://forum.robotframework.org/t/problemas-no-npm-ao-executar-o-rfbrowser-init/6489/7 "2023-11-21T23:41:17Z")

</div>

Hi Josiane,

From your error

```python
 Couldn’t execute npm. Please ensure you have node.js and npm installed and in PATH

```

Since it appears you are using windows, try typing

```python
echo %PATH%

```

and see if the node folder is in the path?

Also you can try running

```python
npm -?

```

This should give you the npm help screen:

```python
npm <command>

Usage:

npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term>
npm help npm more involved overview

```

If it doesn’t then the issue is not a browser library issue.

Also a tip, if you had the command line window open before you installed NodeJS, then the path update that NodeJS installer should have done won’t have been applied to your command window (this is how windows works), you should keep all the command windows closed when installing NodeJS and python, then open a new command window after the installs are finished to get the path updates.

Hope that helps,

Dave.
