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 './Controllers/user' #7

Open
y9c opened this issue Jan 18, 2016 · 6 comments
Open

Error: Cannot find module './Controllers/user' #7

y9c opened this issue Jan 18, 2016 · 6 comments

Comments

@y9c
Copy link
Contributor

y9c commented Jan 18, 2016

module.js:327
    throw err;
    ^

Error: Cannot find module './Controllers/user'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.exports.setRequestUrl (/xxxx/Coding/nodejs/nodejs/NodeSample/routes.js:3:16)
    at Object.<anonymous> (/xxxx/nodejs/nodejs/NodeSample/app.js:27:11)
    at Module._compile (module.js:397:26)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)

The 'controllers' folder start with a lowercase letter 'c', but the importing command starts with capital letter 'C'.

@y9c
Copy link
Contributor Author

y9c commented Jan 18, 2016

if(!path.existsSync(root)){
         ^

TypeError: path.existsSync is not a function

@licongmu
Copy link

yeah,the project is created early,it is not suitable in current Node and Express,i'm gonna modify it.

@y9c
Copy link
Contributor Author

y9c commented Jan 18, 2016

looking forword

@coderefractor
Copy link

Looking forward

@rahulg30
Copy link

I am having same issue....also looking forward for the same

@Firdousrida
Copy link

check the names of the file and folders. spelling mistakes bring error too

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

5 participants