Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

atom fail to start a terminal due to nuclide

I'm trying to set up the atom editor as an ide for python development on linux, and I've installed the following packages:

Community Packages (14) [home path]/.atom/packages
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] (disabled)
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

and when i try to start a terminal from "view --> terminal --> start new terminal" i get the following error:

For more info check out the docs: https://nuclide.io/docs/features/terminal
Error starting process:
Error: Cannot find module '[home path]/.atom/packages/atom-ide-ui/node_modules/nuclide-prebuilt-libs/pty/build/pty-node-v69-linux-x64/pty.node'

I've searched the error and i think it's a version mismatch.

after a lot of searching and getting nothing i tried to create that folder and copy the "pty.node" from "pty-node-v57-linux-x64" but the terminal fail anyway and return the error:

For more info check out the docs: https://nuclide.io/docs/features/terminal
Error starting process:
Error: The module '[home path]/.atom/packages/atom-ide-ui/node_modules/nuclide-prebuilt-libs/pty/build/pty-node-v69-linux-x64/pty.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 69. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

so i searched and tried some random things like:

$ cd [home path].atom/packages/atom-ide-ui/node_modules/nuclide-prebuilt-libs/pty/build
$ node -p process.versions.modules
57
$ npm install
npm ERR! Linux 5.3.0-40-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] prepublish: `npm run tsc && cp src/index.js.flow lib/`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] prepublish script 'npm run tsc && cp src/index.js.flow lib/'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pty package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run tsc && cp src/index.js.flow lib/
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs pty
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls pty
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     [home path].atom/packages/atom-ide-ui/node_modules/nuclide-prebuilt-libs/pty/build/npm-debug.log

and other useless things.

I'm totally new to npm so i don't know how to interpret properly those outputs.

any idea to solve this? or any alternative packages to set up atom as a python ide?

like image 404
simone viozzi Avatar asked Mar 19 '20 13:03

simone viozzi


People also ask

Does Atom have its own terminal?

atom-ide-terminal stays in the bottom of your editor while you work. Click on a status icon to toggle that terminal (or ctrl-` ). Right click the status icon for a list of available commands. From the right-click menu you can color code the status icon as well as hide or close the terminal instance.

What is the best terminal package for Atom?

A terminal package for Atom, complete with themes, API and more for PlatformIO IDE.

How do I stop Atom from running?

To run program, click the '+' at the bottom-left of the Atom window. This will open up a terminal window, right below the file window. 5. To stop the program, click in the terminal window, and type Ctrl + C (Mac / Windows).

How do you pull up the terminal in an Atom?

Open a Terminal in Atom editor You can go to Packages > platformio-ide-terminal > Toggle to show or hide the terminal. Alternatively, you can use the shortcut command(CTRL + ~ in Windows, ⌘ + ~ in MacOS) used to open the terminal inside the atom editor.


1 Answers

I had the same problem. This is my environment:

❯ apm -v                  
apm  2.5.2
npm  6.14.8
node 12.4.0 x64
atom 1.54.0
python 
git 2.27.0

So, I went to ~/.atom/packages/atom-ide-ui and reviewed the package.json file to notice atom-ide-ui is using [email protected]. So, I installed the latest version of nuclide-prebuilt-libs, which, at the moment of writing, is 0.6.3:

❯ npm install [email protected]

After that, opening the terminal (ctrl+shift+t) works like a charm.

like image 91
flags Avatar answered Oct 07 '22 06:10

flags