Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Cannot find module 'php' #7

Open
nwgat opened this issue Jan 9, 2015 · 5 comments
Open

Cannot find module 'php' #7

nwgat opened this issue Jan 9, 2015 · 5 comments

Comments

@nwgat
Copy link

nwgat commented Jan 9, 2015

nwgat@sever:~/test/node-php/tests$ nodejs express.js

module.js:340
throw err;
^
Error: Cannot find module 'php'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/nwgat/test/node-php/tests/express.js:2:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

@nwgat
Copy link
Author

nwgat commented Jan 9, 2015

change var php = require("php"); to var php = require("../") in tests/express.js fixed it for me

@likethemammal
Copy link

The var php = require("php"); line is in the example on the npm site. Might consider changing it there too.

@json2d
Copy link

json2d commented Aug 1, 2016

var php = require("../") doesnt work, am i missing something?

@blaskotron
Copy link

blaskotron commented Aug 8, 2016

Doesn't work for me either. I just get cannot find module ../

@zimme
Copy link

zimme commented Feb 3, 2017

It needs to be 'node-php' as that's the package name.

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

5 participants