Comments (10)
You need to cd backend/
and install dependencies. Seems like dotenv is not installed. Try npm install -y
from wix-clone.
@abhibagul can you provide the screenshot of the folder structure of your backend because it is showing this problem
[nodemon] starting babel-node -r dotenv/config ./src/server.js
internal/modules/cjs/loader.js:800
throw err;
^
Error: Cannot find module '/projects/novac-side-projects/Wix-Clone/backend/dotenv/config'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.Module._load (internal/modules/cjs/loader.js:690:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
at Object. (/projects/novac-side-projects/Wix-Clone/backend/node_modules/babel-cli/lib/_babel-node.js:154:22)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
at internal/main/run_main_module.js:17:11 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
i did whatever you told me to do but still i am getting this above error
from wix-clone.
Have you created the .env
file? Although, the issue still seems to me about dependencies not getting installed properly.
Also, make sure you are starting server as npm run dev
from wix-clone.
Yes sir i have created the .env file in the directory and also completed all the procedures listed by you. Also i have tried to start the server using npm run dev.
from wix-clone.
Please share your .env
file also open backend/src/db.js
and replace the line 6 with,
client = await MongoClient.connect( "mongodb://localhost:27017", {
from wix-clone.
@abhibagul it is showing this error
Error: Cannot find module '/projects/novac-side-projects/Novac-Builder/Wix-Clone/backend/dotenv/config'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at Object. (/projects/novac-side-projects/Novac-Builder/Wix-Clone/backend/node_modules/babel-cli/lib/_babel-node.js:154:22)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
from wix-clone.
here is my .env file
JWT_SECRET=""
PORT=8000
API_LOGIN_PERIOD="2d"
from wix-clone.
@abhibagul i ahve also replaced the line 6 with,
client = await MongoClient.connect( "mongodb://localhost:27017", {
from wix-clone.
Make the env file like this. Make sure you have MongoDB installed on your system.
JWT_SECRET="abcdefghijklmnzwqutkjdlndfldf"
PORT=8000
API_DB_NAME="wixclonedb"
API_LOGIN_PERIOD="2d"
from wix-clone.
from wix-clone.
Related Issues (3)
- Server is not starting at all HOT 1
- 01 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wix-clone.