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.

Cannot find module 'lodash'

See original GitHub issue

Description:

Hello. I am trying to get Hydrogen up and running on my machine with the handicap of not being able to use the Atom package manager. See issue. Even with disabling ssl I can’t use the atom package manager so I’ve been downloading packages manually and placing them in .atom/packages.

Steps to Reproduce:

  • Download hydrogen zip from repo

  • Unzip and place in .atom/packages directory

  • Select the “Hydrogen: Start Local Kernel” from command pallete

Versions:

Which OS and which version of Hydrogen and Atom are you running? Windows 7 Hydrogen 2.5.0 Atom 1.27.2 Electron 1.7.15 Chrome 58.0.3029.110 Node 7.9.0

Logs:

Atom: 1.27.2 x64 Electron: 1.7.15 OS: Microsoft Windows 7 Enterprise Thrown From: Hydrogen package 2.5.0

Stack Trace

Failed to activate the Hydrogen package

At Cannot find module 'lodash'

Error: Cannot find module 'lodash'
    at Module._resolveFilename (module.js:470:15)
    at Module._resolveFilename (~/AppData/Local/atom/app-1.27.2/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (~/AppData/Local/atom/app-1.27.2/resources/app/src/module-cache.js:354:58)
    at Module.require (/app.asar/static/index.js:40:43)
    at require (~/AppData/Local/atom/app-1.27.2/resources/app/src/native-compile-cache.js:66:33)
    at /packages/hydrogen-2.5.0/lib/main.js:9:14)
    at /packages/hydrogen-2.5.0/lib/main.js:568:24)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.27.2/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .js] (~/AppData/Local/atom/app-1.27.2/resources/app/src/compile-cache.js:240:29)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (/app.asar/static/index.js:47:45)
    at require (internal/module.js:20:19)
    at customRequire (~/AppData/Local/atom/app-1.27.2/resources/app/static/<embedded>:96:26)
    at Package.requireMainModule (~/AppData/Local/atom/app-1.27.2/resources/app/src/package.js:782:33)
    at Package.activateNow (~/AppData/Local/atom/app-1.27.2/resources/app/src/package.js:220:40)
    at activationCommandSubscriptions.add.commandRegistry.onWillDispatch.event (~/AppData/Local/atom/app-1.27.2/resources/app/src/package.js:865:28)
    at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.27.2/resources/app/node_modules/event-kit/lib/emitter.js:27:20)
    at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.27.2/resources/app/node_modules/event-kit/lib/emitter.js:156:34)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.27.2/resources/app/src/command-registry.js:360:24)
    at Object.didConfirmSelection (~/AppData/Local/atom/app-1.27.2/resources/app/node_modules/command-palette/lib/command-palette-view.js:152:35)
    at SelectListView.confirmSelection (~/AppData/Local/atom/app-1.27.2/resources/app/node_modules/atom-select-list/src/select-list-view.js:401:26)
    at SelectListView.didClickItem (~/AppData/Local/atom/app-1.27.2/resources/app/node_modules/atom-select-list/src/select-list-view.js:287:16)
    at ListItemView.onclick (~/AppData/Local/atom/app-1.27.2/resources/app/node_modules/atom-select-list/src/select-list-view.js:222:37)
    at ListItemView.didClick (~/AppData/Local/atom/app-1.27.2/resources/app/node_modules/atom-select-list/src/select-list-view.js:449:16)

Commands

     -0:33.4.0 command-palette:toggle (input.hidden-input)
     -0:27.2.0 hydrogen:start-local-kernel (input.hidden-input)

Non-Core Packages

atom-js 1.2.0 
autocomplete-lodash 0.2.3 
Hydrogen 2.5.0 
iojs-v1.7.15 undefined 
jump-to-import 3.6.5 
mariana-syntax 0.2.0 
react 0.18.0 
zenburn 3.1.0 

Notes:

The below screenshot shows that I installed a lodash package. I didn’t see any in the core packages. You can also see that while atom recognizes hydrogen it cannot fully load it

image

"Please post any error logs and the output of the developer tools as described in our Debugging Guide. " - As far as that I am unable to as the package isn’t fully working so I don’t have the debug capability

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
BenRussertcommented, Jun 13, 2018

You would have to install the dependencies with apm install from within the hydrogen directory after unzipping.

I get the impression the issue is you are on a network with a firewall that blocks access to the web by apps it doesn’t recognize. I’m not sure apm install will work either if that’s the case.

0reactions
BenRussertcommented, Jun 16, 2018

Sorry @bryceh29 those IT people can be pesky.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot find module "lodash" - node.js - Stack Overflow
lodash is part of browser-sync . The best solution is the one provided by Saebyeok. Re-install browser-sync and that should fix the problem....
Read more >
Cannot find module 'lodash' error | bobbyhadz
To solve the error "Cannot find module 'lodash'", make sure to install the lodash package by opening your terminal in your project's root...
Read more >
Cannot find module 'lodash' error [Solved] - Reactgo
The can't find module lodash error occurs, if you're trying to access a lodash module that is not currently installed in your project....
Read more >
Getting error "Cannot find module lodash" #16099 - GitHub
Lodash gets red line with message "Cannot find module lodash". Ctrl + click takes me to index.d.ts file that is type definition for...
Read more >
lodash - npm
The Lodash library exported as Node.js modules. Installation. Using npm: $ npm i -g npm $ npm i --save lodash. In Node.js ...
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