Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Error: Cannot find module 'lodash.merge' #16

Open
aral opened this issue May 11, 2018 · 0 comments
Open

Error: Cannot find module 'lodash.merge' #16

aral opened this issue May 11, 2018 · 0 comments

Comments

@aral
Copy link

aral commented May 11, 2018

The runtime error mentioned in the title is thrown when LSEQTree is installed in a third-party project via npm (Node: v8.11.1, npm: v6.0.1)

Full error:

Error: Cannot find module 'lodash.merge'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/aral/indie/net/meta/spikes/crdt/lseqtree-test/node_modules/lseqtree/lib/lseqtree.js:3:15)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

The issue appears to be with the manner in which lodash merge is being imported.

The issue doesn’t manifest when running tests on a LSEQTree working itself via npm test.

Fix: require('lodash.merge')require('lodash/merge')

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant