Skip to content

Instantly share code, notes, and snippets.

@mtt87
Created February 1, 2015 10:41
Show Gist options
  • Save mtt87/2c3c28c27c639af6e203 to your computer and use it in GitHub Desktop.
Save mtt87/2c3c28c27c639af6e203 to your computer and use it in GitHub Desktop.
Trying to add some npm modules to a Meteor project
npm-container: updating npm dependencies -- ytdl-core, youtube-api...
npm ERR! Error: Problems were encountered
npm ERR! Please correct and try again.
npm ERR! missing: tap-consumer@*, required by [email protected]
npm ERR! at shrinkwrap_
(/Users/mattia/.meteor/packages/meteor-tool/.1.0.40.959pzb++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/npm/lib/shrinkwrap.js:30:15)
npm ERR! at
/Users/mattia/.meteor/packages/meteor-tool/.1.0.40.959pzb++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/npm/lib/shrinkwrap.js:24:5
npm ERR! at
/Users/mattia/.meteor/packages/meteor-tool/.1.0.40.959pzb++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/npm/lib/ls.js:45:30
npm ERR! at
/Users/mattia/.meteor/packages/meteor-tool/.1.0.40.959pzb++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/read-installed/read-installed.js:130:5
npm ERR! at
/Users/mattia/.meteor/packages/meteor-tool/.1.0.40.959pzb++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/read-installed/read-installed.js:244:14
npm ERR! at cb
(/Users/mattia/.meteor/packages/meteor-tool/.1.0.40.959pzb++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
npm ERR! at
/Users/mattia/.meteor/packages/meteor-tool/.1.0.40.959pzb++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/read-installed/read-installed.js:244:14
npm ERR! at cb
(/Users/mattia/.meteor/packages/meteor-tool/.1.0.40.959pzb++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
npm ERR! at
/Users/mattia/.meteor/packages/meteor-tool/.1.0.40.959pzb++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/read-installed/read-installed.js:244:14
npm ERR! at cb
(/Users/mattia/.meteor/packages/meteor-tool/.1.0.40.959pzb++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 14.1.0
npm ERR! command
"/Users/mattia/.meteor/packages/meteor-tool/.1.0.40.959pzb++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/bin/node"
"/Users/mattia/.meteor/packages/meteor-tool/.1.0.40.959pzb++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/bin/npm"
"shrinkwrap"
npm ERR! cwd
/Users/mattia/Dev/youtubeBoom2/packages/npm-container/.npm/package-new-uzl732
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!
/Users/mattia/Dev/youtubeBoom2/packages/npm-container/.npm/package-new-uzl732/npm-debug.log
npm ERR! not ok code 0
=> Errors while adding packages:
While building package npm-container:
error: couldn't run `npm shrinkwrap`
@mtt87
Copy link
Author

mtt87 commented Feb 1, 2015

What I'm doing

  • meteor add meteorhacks:npm
  • edit packages.json
{
  "ytdl-core": "0.4.1",
  "youtube-api": "0.3.2"
}
  • run meteor

Another way to do it?

I'm reading the docs and they say it should be possible to include npm modules manually with
packages/ytdl-core/ + package.js

Npm.depends({
  'ytdl-core': "0.3.2"
});

But then in my app when I call on the server-side var ytdl = Npm.require('ytdl-core'); I have an error and as far as I can see that module is never being installed by meteor.

Help? 😄

@mtt87
Copy link
Author

mtt87 commented Feb 1, 2015

Seems like the problem is the youtube-api module that is not installing

@mtt87
Copy link
Author

mtt87 commented Feb 1, 2015

FIXED

npm cache clean -f did the trick

☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment