Skip to content
This repository was archived by the owner on Jul 6, 2019. It is now read-only.

multiple packages fail #157

Closed
bluelovers opened this issue Feb 7, 2018 · 2 comments
Closed

multiple packages fail #157

bluelovers opened this issue Feb 7, 2018 · 2 comments

Comments

@bluelovers
Copy link

npx --package rollup --package rollup-plugin-node-resolve --package rollup-plugin-commonjs -c "rollup -c"

Error: Cannot find module 'rollup-plugin-node-resolve'

rollup.config.js

import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';

var pkg = require('./package.json');

export default {
	input: 'index.js',
	name: pkg.name,
	plugins: [
		commonjs(),
		resolve(),
	],
	output: [
		{ file: pkg.main, format: 'umd' },
		{ file: pkg.module, format: 'es' },
	],
}
@zkat
Copy link
Owner

zkat commented May 3, 2018

So this isn't something npx supports right now -- -p makes the binaries for that package available, not the library versions. I'm changing this, though, with #180 (assuming that lands), so this sort of thing will be possible.

zkat added a commit that referenced this issue May 3, 2018
Fixes: #157
Ref: #160

This makes it so you can do `npx -p lodash node -r lodash` when lodash is not
already installed. One big downside of this patch is that because of the semantics
of that node feature, NODE_PATH will always be treated as a _fallback_. That is, if
you already have one version of lodash installed in a local npm project you're
currently in the directory of, you won't be able to override it with the
temporary install.
@zkat
Copy link
Owner

zkat commented May 3, 2018

Closing this as a dupe of #153

@zkat zkat closed this as completed May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants