2

I have written a private general purpose NPM package. Now I'm writing a meteor package because I need to access mongo collections for example. I also need to access my private NPM package.

So I created a blank meteor package:

meteor create my-package --package

and then added my NPM package:

// package.js

...
Npm.depends({
  '@myorg/my-package': '1.0.0'
});
...

Whenever I try to add this package to my actual app, it gives me the following:

error: there is no npm package named '@myorg/my-package' in the npm registry

I already tried to put an .npmrc file with a valid access-token into the package directory but it didn't seem to work. Also, when I run npm whoami, it shows my username so I'm actually logged in and can, theoretically speaking, access my package.

Does anyone have an idea how to fix this?

EDIT:
I now opened an issue for meteor: #10102

Rockettomatoo
  • 257
  • 6
  • 18
  • 2
    NPM Depends is a little bit outdated. Maybe you try [tmeasday:check-npm-versions](https://github.com/tmeasday/check-npm-versions) to soft link to your npm package and [manually link the package in your package.json](https://stackoverflow.com/questions/15806241/how-to-specify-local-modules-as-npm-package-dependencies). – Jankapunkt Jul 26 '18 at 14:18
  • Which version of Meteor are you running? Maybe the `npm` version bundled with that Meteor version doesn't support scopes? – coagmano Jul 26 '18 at 23:44
  • @FredStark I'm using the latest version of Meteor which is `1.7.0.3`. – Rockettomatoo Jul 27 '18 at 06:13
  • Weird. I would go with @Jankapunkt's recommendation then. Maybe open an issue on the meteor repo too, seems like a bug – coagmano Jul 27 '18 at 06:15

0 Answers0