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

npm issue #25

Closed
iraizo opened this issue Sep 21, 2019 · 6 comments
Closed

npm issue #25

iraizo opened this issue Sep 21, 2019 · 6 comments

Comments

@iraizo
Copy link

iraizo commented Sep 21, 2019

`dev:2bored2wait raizo$ npm start

2bored2wait@1.0.0 start /Users/raizo/Desktop/2bored2wait
node main.js

internal/modules/cjs/loader.js:775
throw err;
^

Error: Cannot find module 'lodash.merge'
Require stack:

  • /Users/raizo/Desktop/2bored2wait/node_modules/minecraft-protocol/src/transforms/serializer.js
  • /Users/raizo/Desktop/2bored2wait/node_modules/minecraft-protocol/src/client.js
  • /Users/raizo/Desktop/2bored2wait/node_modules/minecraft-protocol/src/index.js
  • /Users/raizo/Desktop/2bored2wait/main.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15)
    at Function.Module._load (internal/modules/cjs/loader.js:677:27)
    at Module.require (internal/modules/cjs/loader.js:830:19)
    at require (internal/modules/cjs/helpers.js:68:18)
    at Object. (/Users/raizo/Desktop/2bored2wait/node_modules/minecraft-protocol/src/transforms/serializer.js:9:15)
    at Module._compile (internal/modules/cjs/loader.js:936:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
    at Module.load (internal/modules/cjs/loader.js:790:32)
    at Function.Module._load (internal/modules/cjs/loader.js:703:12)
    at Module.require (internal/modules/cjs/loader.js:830:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Users/raizo/Desktop/2bored2wait/node_modules/minecraft-protocol/src/transforms/serializer.js',
    '/Users/raizo/Desktop/2bored2wait/node_modules/minecraft-protocol/src/client.js',
    '/Users/raizo/Desktop/2bored2wait/node_modules/minecraft-protocol/src/index.js',
    '/Users/raizo/Desktop/2bored2wait/main.js'
    ]
    }
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! 2bored2wait@1.0.0 start: node main.js
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the 2bored2wait@1.0.0 start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

`

@Beaness
Copy link

Beaness commented Sep 22, 2019

Do npm install lodash

@themoonisacheese
Copy link
Owner

yep, should solve the issue.

@sijanec
Copy link

sijanec commented Sep 23, 2019

you should add it as a dependency

@themoonisacheese
Copy link
Owner

after looking into it, this makes absolutely no sense. My code doesn't require lodash directly, but it is a dependency of minecraft-protocol. minecraft protocol has it properly set as its dependency, so it should be installed correctly in the first place. there is absolutely 0 reason for it not to.

Leaving open in case it's useful to someone, as I will not be adding a dependency i don't need based on 2 reports.

@sijanec
Copy link

sijanec commented Sep 24, 2019

Yeah, understandable, I was just proposing a workaround for anyone else.
After I added it as a direct dependency and npm update I got it running.

Or you can just force the install using npm install.>>>

@themoonisacheese
Copy link
Owner

the guys from minecraft-protocol have informed me that it was due to me including package-lock.json, which i shouldn't do for a variety of reasons including this exact problem. i have removed it from the repo, feel free to open again if the issue persists.

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

4 participants