Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module 'vinyl-source-stream' #6

Closed
azz0r opened this issue Sep 1, 2017 · 7 comments
Closed

Error: Cannot find module 'vinyl-source-stream' #6

azz0r opened this issue Sep 1, 2017 · 7 comments

Comments

@azz0r
Copy link

azz0r commented Sep 1, 2017

const comms = {
	requestData: async function (method, url, requestBody) {
		return await r2[method](url, requestBody)
	}
}

RequestData results in

Welcome to 3VOT
module.js:457
    throw err;
    ^

Error: Cannot find module 'vinyl-source-stream'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (***/node_modules/r2/tasks/dist.js:10:20)
    at Module._compile (module.js:556:32)
    at Module._extensions..js (module.js:565:10)
    at Object.require.extensions.(anonymous function) [as .js] (***/node_modules/babel-register/lib/node.js:152:7)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
@stripedpajamas
Copy link

I'm not sure that this has to do with r2, maybe you can provide some more context.

This worked fine for me, natively with node 8 and also babeled:

const r2 = require('./');

const comms = {
        requestData: async function(method, url, requestBody) {
                return await r2[method](url, requestBody)
        }
}

comms.requestData('get', 'http://localhost:8080');

@bmcminn
Copy link

bmcminn commented Sep 4, 2017

I just hit this same issue and it's because you installed the wrong module. The r2 library on NPM is for a sales force capable single page web app composition module: https://www.npmjs.com/package/r2

@mikeal I know the package.json file specifies name: "r2" but I think issue #7 can also address this problem with name conflicts on the NPM registry as well.

@g8up
Copy link

g8up commented Sep 5, 2017

thx for reminding!
I have installed by this way:

npm i git+https://github.com/mikeal/r2.git

@aganglada
Copy link

@g8up Did that, now running into

Error: Cannot find module 'caseless'

@stripedpajamas
Copy link

stripedpajamas commented Sep 5, 2017

@aganglada there's a PR open for the fix for that... caseless isn't marked as dependency but it should be. Probably just install caseless manually or wait for #8 to be merged.

@aganglada
Copy link

Alright, that what I did for now :) Thanks!

@gr2m
Copy link
Collaborator

gr2m commented Feb 27, 2018

all fixed now :)

@gr2m gr2m closed this as completed Feb 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants