Hyperline / hyperline

✨ Status line plugin for Hyper ✨
MIT License
619 stars 120 forks source link

Error: Cannot find module 'react' #127

Closed archenroot closed 6 years ago

archenroot commented 6 years ago
zangetsu@localhost ~/.hyper_plugins/local/hyperline $ hyper
Gtk-Message: Failed to load module "canberra-gtk-module"
{ Error: Cannot find module 'react'
    at Module._resolveFilename (module.js:470:15)
    at Function.Module._resolveFilename (/opt/Hyper/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/zangetsu/.hyper_plugins/local/hyperline/dist/hyperline.js:73:18)
    at __webpack_require__ (/home/zangetsu/.hyper_plugins/local/hyperline/dist/hyperline.js:20:30)
    at Object.<anonymous> (/home/zangetsu/.hyper_plugins/local/hyperline/dist/hyperline.js:1334:64)
    at __webpack_require__ (/home/zangetsu/.hyper_plugins/local/hyperline/dist/hyperline.js:20:30)
    at /home/zangetsu/.hyper_plugins/local/hyperline/dist/hyperline.js:66:18 code: 'MODULE_NOT_FOUND' }
[Notification] Plugin error!: Plugin "hyperline" failed to load (Cannot find module 'react')
running in prod mode
electron will open file:///opt/Hyper/resources/app.asar/index.html
[Notification] Plugin error!: Plugin "hyperline" failed to load (Cannot find module 'react')
Checking for notification messages
ignoring auto updates during dev
No matching notification messages
archenroot commented 6 years ago

After I added react latest version available into "dependencies" block I got another error:

zangetsu@localhost ~/.hyper_plugins/local/hyperline $ hyper
Gtk-Message: Failed to load module "canberra-gtk-module"
{ Error: Cannot find module 'hyper/component'
    at Module._resolveFilename (module.js:470:15)
    at Function.Module._resolveFilename (/opt/Hyper/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/zangetsu/.hyper_plugins/local/hyperline/dist/hyperline.js:79:18)
    at __webpack_require__ (/home/zangetsu/.hyper_plugins/local/hyperline/dist/hyperline.js:20:30)
    at Object.<anonymous> (/home/zangetsu/.hyper_plugins/local/hyperline/dist/hyperline.js:151:74)
    at __webpack_require__ (/home/zangetsu/.hyper_plugins/local/hyperline/dist/hyperline.js:20:30)
    at Object.<anonymous> (/home/zangetsu/.hyper_plugins/local/hyperline/dist/hyperline.js:1336:78) code: 'MODULE_NOT_FOUND' }
[Notification] Plugin error!: Plugin "hyperline" failed to load (Cannot find module 'hyper/component')
running in prod mode
electron will open file:///opt/Hyper/resources/app.asar/index.html
[Notification] Plugin error!: Plugin "hyperline" failed to load (Cannot find module 'hyper/component')
Checking for notification messages
ignoring auto updates during dev
No matching notification messages
archenroot commented 6 years ago

I am on branch hyper-2.0.4,maybe I should install latest dev branch.

NOTE: In both cases reporting error the plugin works and shows and updates values.

gabemeola commented 6 years ago

Looks like it isn't a dependency in package.json https://github.com/Hyperline/hyperline/blob/48381dd6f906599b8ad083d55bb04622127b963c/package.json#L28

mloberg commented 6 years ago

Using version "0.6.1" fixed Hyperline for me. Use hyperline#0.6.1 instead of hyperline in your plugins list.

Mohamed3on commented 6 years ago

Same issue here

geoffreyvanwyk commented 6 years ago

@mloberg's suggestion works, but then the prompt is missing.

Update: After specifying the shell in ~/.hyper.js and closing and reopening Hyper a couple of times, the prompt is back.

ButchAnton commented 6 years ago

I was experiencing the same problem. After forcing hyperline version 0.6.1, things started working again. If it doesn't immediately work, make sure you delete the .hyper_plugins directory and do a full reload of the plugins from within hyper.

kidchenko commented 6 years ago

+1

tbsvttr commented 6 years ago

Same issue here!

xeijin commented 6 years ago

Still broken for me too, adding #0.6.1 resolves for now...

bhavikbhavsar commented 6 years ago

facing same issue!

yipsang commented 6 years ago

The issue still exists, how come it's closed? Falling back to previous version seems not the best solution. Some features are missing in 0.6.1 e.g. Spotify plugin