hexo-cli-extras icon indicating copy to clipboard operation
hexo-cli-extras copied to clipboard

events.js:165 throw er; // Unhandled 'error' event

Open dwapinski opened this issue 6 years ago • 0 comments

How to replicate error:

Install clean Hexo instance

[darek@oc6824586636 Documents]$ hexo init test
INFO  Cloning hexo-starter to ~/Documents/test
Cloning into '/home/darek/Documents/test'...
remote: Counting objects: 65, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 65 (delta 0), reused 0 (delta 0), pack-reused 62
Unpacking objects: 100% (65/65), done.
Submodule 'themes/landscape' (https://github.com/hexojs/hexo-theme-landscape.git) registered for path 'themes/landscape'
Cloning into 'themes/landscape'...
remote: Counting objects: 819, done.
remote: Total 819 (delta 0), reused 0 (delta 0), pack-reused 819
Receiving objects: 100% (819/819), 2.54 MiB | 1.35 MiB/s, done.
Resolving deltas: 100% (432/432), done.
Submodule path 'themes/landscape': checked out '73a23c51f8487cfcd7c6deec96ccc7543960d350'
INFO  Install dependencies
npm WARN deprecated [email protected]: no longer maintained

> [email protected] postinstall /home/darek/Documents/test/node_modules/nunjucks
> node postinstall-build.js src

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 274 packages in 12.237s
INFO  Start blogging with Hexo!

Create test document (success)

[darek@oc6824586636 Documents]$ cd test
[darek@oc6824586636 test]$ 
[darek@oc6824586636 test]$ hexo new post "Test_before_hexo_cli_extras_installation"
INFO  Created: ~/Documents/test/source/_posts/Test-before-hexo-cli-extras-installation.md
[darek@oc6824586636 test]$ 

Install hexo-cli-extras

[darek@oc6824586636 test]$ npm install hexo-cli-extras --save
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ [email protected]
added 25 packages in 4.825s
[darek@oc6824586636 test]$ 

Try to generate post (fail)

darek@oc6824586636 test]$ hexo new post "Test_after_hexo_cli_extras_installation"
INFO  Created: ~/Documents/test/source/_posts/Test-after-hexo-cli-extras-installation.md
events.js:165
      throw er; // Unhandled 'error' event
      ^

Error: spawn /usr/bin/atom ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:201:19)
    at onErrorNT (internal/child_process.js:379:16)
    at process._tickCallback (internal/process/next_tick.js:178:19)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:207:12)
    at onErrorNT (internal/child_process.js:379:16)
    at process._tickCallback (internal/process/next_tick.js:178:19)

Uninstall hexo-cli-extras

ek@oc6824586636 test]$ npm uninstall hexo-cli-extras
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

removed 25 packages in 3.446s

Generate new post again (success):

[darek@oc6824586636 test]$ hexo new post "Test_after_hexo_cli_extras_deinstallation"
INFO  Created: ~/Documents/test/source/_posts/Test-after-hexo-cli-extras-deinstallation.md
[darek@oc6824586636 test]$ 

Npm version:

[darek@oc6824586636 test]$ npm version
{ 'hexo-site': '0.0.0',
  npm: '5.6.0',
  ares: '1.13.0',
  cldr: '33.0',
  http_parser: '2.8.0',
  icu: '61.1',
  modules: '59',
  napi: '3',
  nghttp2: '1.29.0',
  node: '9.11.1',
  openssl: '1.0.2o',
  tz: '2018c',
  unicode: '10.0',
  uv: '1.19.2',
  v8: '6.2.414.46-node.23',
  zlib: '1.2.11' }

Hexo version:

[darek@oc6824586636 test]$ hexo version
hexo: 3.7.1
hexo-cli: 1.1.0
os: Linux 3.10.0-693.21.1.el7.x86_64 linux x64
http_parser: 2.8.0
node: 9.11.1
v8: 6.2.414.46-node.23
uv: 1.19.2
zlib: 1.2.11
ares: 1.13.0
modules: 59
nghttp2: 1.29.0
napi: 3
openssl: 1.0.2o
icu: 61.1
unicode: 10.0
cldr: 33.0
tz: 2018c

dwapinski avatar Apr 18 '18 09:04 dwapinski