Giter Club home page Giter Club logo

ecommerce-react's Introduction

Salinaka | E-commerce react app

Simple ecommerce react js app with firebase [typescript]. Firebase Deploy

Salinaka screenshot Salinaka screenshot Salinaka screenshot Salinaka screenshot

Run Locally

1. Install Dependencies

$ yarn install

2. Create a new firebase project

Login to your google account and create a new firebase project here

Create an .env file and add the following variables.

// SAMPLE CONFIG .env, you should put the actual config details found on your project settings

VITE_FIREBASE_API_KEY=AIzaKJgkjhSdfSgkjhdkKJdkjowf
VITE_FIREBASE_AUTH_DOMAIN=yourauthdomin.firebaseapp.com
VITE_FIREBASE_DB_URL=https://yourdburl.firebaseio.com
VITE_FIREBASE_PROJECT_ID=yourproject-id
VITE_FIREBASE_STORAGE_BUCKET=yourstoragebucket.appspot.com
VITE_FIREBASE_MSG_SENDER_ID=43597918523958
VITE_FIREBASE_APP_ID=234598789798798fg3-034

After setting up necessary configuration, create a Database and choose Cloud Firestore and start in test mode

3. Run development server

$ yarn dev

Build the project

$ yarn build

How to add products or perform CRUD operations for Admin

  1. Navigate to your site to /signup
  2. Create an account for yourself
  3. Go to your firestore collection users collection and edit the account you've just created. Change the role from USER to ADMIN.
  4. Reload or sigin again to see the changes.

Firebase Admin to be integrated soon

Features

  • Admin CRUD operations
  • Firebase authentication
  • Firebase auth provider authentication
  • Account creation and edit

ecommerce-react's People

Contributors

jgudo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ecommerce-react's Issues

Firestore rules

Are the rules written in firestore secure . Can anyone hack my database . Please update the firestore rules so that only specific id's can access the database.

npm Installation

Hello sir,
I just started react and I saw your project on github and I was trying to run it on my system but when I try to install the npm it saws a lot of error and but there is more I some how managed to install npm but when i try to run the project it give me this error:
ERROR in ./node_modules/normalize.css/normalize.css (./node_modules/css-loader/dist/cjs.js??ref--5-1!./node_modules/group-css-media-queries-loader/lib!./node_modules/sass-loader/dist/cjs.js??ref--5-3!./node_modules/normalize.css/normalize.css)
Module build failed (from ./node_modules/group-css-media-queries-loader/lib/index.js):
Error: Cannot find module 'postcss'
could you send me a tutorial video like how to run this project on other system. actually I am just a student and I don't know much about react so it would be so nice if you send me a video.

Syntax error in database rules

I'm trying to deploy, using firebase hosting and the following error happens:

Error: Syntax error in database rules:
61:25: No such method/property 'isArray'.

in:

"imageCollection": {
".validate": "newData.isArray()"
}

Would you help me?

"npm run dev-server" failed in ubuntu

Entrypoint main = js/main.bundle.js
[0] multi (webpack)-dev-server/client?http://localhost:8080 @babel/polyfill ./src/index.jsx 52 bytes {main} [built]
[./node_modules/@babel/polyfill/lib/index.js] 686 bytes {main} [built]
[./node_modules/@babel/polyfill/lib/noConflict.js] 567 bytes {main} [built]
[./node_modules/@babel/polyfill/node_modules/core-js/library/fn/global.js] 87 bytes {main} [built]
[./node_modules/normalize.css/normalize.css] 914 bytes {main} [built] [failed] [1 error]
[./node_modules/react-dom/index.js] 1.33 KiB {main} [built]
[./node_modules/react-phone-input-2/lib/style.css] 914 bytes {main} [built] [failed] [1 error]
[./node_modules/react/index.js] 190 bytes {main} [built]
[./node_modules/webfontloader/webfontloader.js] 12.2 KiB {main} [built]
[./node_modules/webpack-dev-server/client/index.js?http://localhost:8080] (webpack)-dev-server/client?http://localhost:8080 4.29 KiB {main} [built]
[./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.51 KiB {main} [built]
[./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.53 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/createSocketUrl.js] (webpack)-dev-server/client/utils/createSocketUrl.js 2.91 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/log.js] (webpack)-dev-server/client/utils/log.js 964 bytes {main} [built]
[./src/index.jsx] 1.49 KiB {main} [built]
+ 2594 hidden modules

ERROR in ./node_modules/normalize.css/normalize.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleError: Module Error (from ./node_modules/sass-loader/dist/cjs.js):
Missing binding /root/ecommerce-react/node_modules/node-sass/vendor/linux-x64-83/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 14.x

Found bindings for the following environments:

  • Windows 64-bit with Node.js 14.x

This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass to download the binding for your current environment.
at Object.emitError (/root/ecommerce-react/node_modules/webpack/lib/NormalModule.js:173:6)
at getSassImplementation (/root/ecommerce-react/node_modules/sass-loader/dist/utils.js:59:21)
at Object.loader (/root/ecommerce-react/node_modules/sass-loader/dist/index.js:35:59)
@ ./src/index.jsx 2:0-37
@ multi @babel/polyfill ./src/index.jsx

ERROR in ./src/styles/style.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleError: Module Error (from ./node_modules/sass-loader/dist/cjs.js):
Missing binding /root/ecommerce-react/node_modules/node-sass/vendor/linux-x64-83/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 14.x

Found bindings for the following environments:

  • Windows 64-bit with Node.js 14.x

This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass to download the binding for your current environment.
at Object.emitError (/root/ecommerce-react/node_modules/webpack/lib/NormalModule.js:173:6)
at getSassImplementation (/root/ecommerce-react/node_modules/sass-loader/dist/utils.js:59:21)
at Object.loader (/root/ecommerce-react/node_modules/sass-loader/dist/index.js:35:59)
@ ./src/index.jsx 8:0-27
@ multi @babel/polyfill ./src/index.jsx

ERROR in ./node_modules/react-phone-input-2/lib/style.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleError: Module Error (from ./node_modules/sass-loader/dist/cjs.js):
Missing binding /root/ecommerce-react/node_modules/node-sass/vendor/linux-x64-83/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 14.x

Found bindings for the following environments:

  • Windows 64-bit with Node.js 14.x

This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass to download the binding for your current environment.
at Object.emitError (/root/ecommerce-react/node_modules/webpack/lib/NormalModule.js:173:6)
at getSassImplementation (/root/ecommerce-react/node_modules/sass-loader/dist/utils.js:59:21)
at Object.loader (/root/ecommerce-react/node_modules/sass-loader/dist/index.js:35:59)
@ ./src/index.jsx 5:0-43
@ multi @babel/polyfill ./src/index.jsx
Child HtmlWebpackCompiler:
1 asset
Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
[./node_modules/html-webpack-plugin/lib/loader.js!./index.html] 657 bytes {HtmlWebpackPlugin_0} [built]
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--5-1!node_modules/group-css-media-queries-loader/lib/index.js!node_modules/sass-loader/dist/cjs.js??ref--5-3!node_modules/normalize.css/normalize.css:
Entrypoint mini-css-extract-plugin = *
[./node_modules/css-loader/dist/cjs.js?!./node_modules/group-css-media-queries-loader/lib/index.js!./node_modules/sass-loader/dist/cjs.js?!./node_modules/normalize.css/normalize.css] ./node_modules/css-loader/dist/cjs.js??ref--5-1!./node_modules/group-css-media-queries-loader/lib!./node_modules/sass-loader/dist/cjs.js??ref--5-3!./node_modules/normalize.css/normalize.css 739 bytes {mini-css-extract-plugin} [built] [failed] [2 errors]

ERROR in ./node_modules/normalize.css/normalize.css (./node_modules/css-loader/dist/cjs.js??ref--5-1!./node_modules/group-css-media-queries-loader/lib!./node_modules/sass-loader/dist/cjs.js??ref--5-3!./node_modules/normalize.css/normalize.css)
Module Error (from ./node_modules/sass-loader/dist/cjs.js):
Missing binding /root/ecommerce-react/node_modules/node-sass/vendor/linux-x64-83/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 14.x

Found bindings for the following environments:
  - Windows 64-bit with Node.js 14.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.

ERROR in ./node_modules/normalize.css/normalize.css (./node_modules/css-loader/dist/cjs.js??ref--5-1!./node_modules/group-css-media-queries-loader/lib!./node_modules/sass-loader/dist/cjs.js??ref--5-3!./node_modules/normalize.css/normalize.css)
Module build failed (from ./node_modules/group-css-media-queries-loader/lib/index.js):
Error: PostCSS received undefined instead of CSS string
    at new Input (/root/ecommerce-react/node_modules/postcss/lib/input.js:38:13)
    at parse (/root/ecommerce-react/node_modules/postcss/lib/parse.js:13:15)
    at new LazyResult (/root/ecommerce-react/node_modules/postcss/lib/lazy-result.js:64:16)
    at Processor.<anonymous> (/root/ecommerce-react/node_modules/postcss/lib/processor.js:142:12)
    at Processor.process (/root/ecommerce-react/node_modules/postcss/lib/processor.js:121:23)
    at Object.GroupCssMediaQueriesLoader (/root/ecommerce-react/node_modules/group-css-media-queries-loader/lib/index.js:21:12)

Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--5-1!node_modules/group-css-media-queries-loader/lib/index.js!node_modules/sass-loader/dist/cjs.js??ref--5-3!node_modules/react-phone-input-2/lib/style.css:
Entrypoint mini-css-extract-plugin = *
[./node_modules/css-loader/dist/cjs.js?!./node_modules/group-css-media-queries-loader/lib/index.js!./node_modules/sass-loader/dist/cjs.js?!./node_modules/react-phone-input-2/lib/style.css] ./node_modules/css-loader/dist/cjs.js??ref--5-1!./node_modules/group-css-media-queries-loader/lib!./node_modules/sass-loader/dist/cjs.js??ref--5-3!./node_modules/react-phone-input-2/lib/style.css 739 bytes {mini-css-extract-plugin} [built] [failed] [2 errors]

ERROR in ./node_modules/react-phone-input-2/lib/style.css (./node_modules/css-loader/dist/cjs.js??ref--5-1!./node_modules/group-css-media-queries-loader/lib!./node_modules/sass-loader/dist/cjs.js??ref--5-3!./node_modules/react-phone-input-2/lib/style.css)
Module Error (from ./node_modules/sass-loader/dist/cjs.js):
Missing binding /root/ecommerce-react/node_modules/node-sass/vendor/linux-x64-83/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 14.x

Found bindings for the following environments:
  - Windows 64-bit with Node.js 14.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.

ERROR in ./node_modules/react-phone-input-2/lib/style.css (./node_modules/css-loader/dist/cjs.js??ref--5-1!./node_modules/group-css-media-queries-loader/lib!./node_modules/sass-loader/dist/cjs.js??ref--5-3!./node_modules/react-phone-input-2/lib/style.css)
Module build failed (from ./node_modules/group-css-media-queries-loader/lib/index.js):
Error: PostCSS received undefined instead of CSS string
    at new Input (/root/ecommerce-react/node_modules/postcss/lib/input.js:38:13)
    at parse (/root/ecommerce-react/node_modules/postcss/lib/parse.js:13:15)
    at new LazyResult (/root/ecommerce-react/node_modules/postcss/lib/lazy-result.js:64:16)
    at Processor.<anonymous> (/root/ecommerce-react/node_modules/postcss/lib/processor.js:142:12)
    at Processor.process (/root/ecommerce-react/node_modules/postcss/lib/processor.js:121:23)
    at Object.GroupCssMediaQueriesLoader (/root/ecommerce-react/node_modules/group-css-media-queries-loader/lib/index.js:21:12)

Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--5-1!node_modules/group-css-media-queries-loader/lib/index.js!node_modules/sass-loader/dist/cjs.js??ref--5-3!src/styles/style.scss:
Entrypoint mini-css-extract-plugin = *
[./node_modules/css-loader/dist/cjs.js?!./node_modules/group-css-media-queries-loader/lib/index.js!./node_modules/sass-loader/dist/cjs.js?!./src/styles/style.scss] ./node_modules/css-loader/dist/cjs.js??ref--5-1!./node_modules/group-css-media-queries-loader/lib!./node_modules/sass-loader/dist/cjs.js??ref--5-3!./src/styles/style.scss 739 bytes {mini-css-extract-plugin} [built] [failed] [2 errors]

ERROR in ./src/styles/style.scss (./node_modules/css-loader/dist/cjs.js??ref--5-1!./node_modules/group-css-media-queries-loader/lib!./node_modules/sass-loader/dist/cjs.js??ref--5-3!./src/styles/style.scss)
Module Error (from ./node_modules/sass-loader/dist/cjs.js):
Missing binding /root/ecommerce-react/node_modules/node-sass/vendor/linux-x64-83/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 14.x

Found bindings for the following environments:
  - Windows 64-bit with Node.js 14.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.

ERROR in ./src/styles/style.scss (./node_modules/css-loader/dist/cjs.js??ref--5-1!./node_modules/group-css-media-queries-loader/lib!./node_modules/sass-loader/dist/cjs.js??ref--5-3!./src/styles/style.scss)
Module build failed (from ./node_modules/group-css-media-queries-loader/lib/index.js):
Error: PostCSS received undefined instead of CSS string
    at new Input (/root/ecommerce-react/node_modules/postcss/lib/input.js:38:13)
    at parse (/root/ecommerce-react/node_modules/postcss/lib/parse.js:13:15)
    at new LazyResult (/root/ecommerce-react/node_modules/postcss/lib/lazy-result.js:64:16)
    at Processor.<anonymous> (/root/ecommerce-react/node_modules/postcss/lib/processor.js:142:12)
    at Processor.process (/root/ecommerce-react/node_modules/postcss/lib/processor.js:121:23)
    at Object.GroupCssMediaQueriesLoader (/root/ecommerce-react/node_modules/group-css-media-queries-loader/lib/index.js:21:12)

ℹ 「wdm」: Failed to compile.

how do i solve this issue?

Keywords

Why can't we search with keywords

getting blank screen after fixing from issues closed by you also

hey sir,im getting blank screen again and again after fixing all the issues . there is not a issue in yarn dev and not in yarn build all run succesfully. yet it gives me blank screen. ps; when i strat yarn build it doesnt show any files in firebase database. im doing something wrong but i dont know which part it is. kindly help
Screenshot (70)

Making the code mobile responsive

The CSS Code could be refactored to be made more responsive on the mobile views.
. Things that can be done
Adding a hamburger(Updating the Navbar)
Centering the Product Cards on Mobile Views

Need to update ReadMe doc

As you have changed the "firebaseConfig' constants names, so please update README.md file with updated env file variables.

It should start with "VITE_", like -
VITE_FIREBASE_API_KEY=AIzaKJgkjhSdfSgkjhdkKJdkjowf
VITE_FIREBASE_AUTH_DOMAIN=yourauthdomin.firebaseapp.com
VITE_FIREBASE_DB_URL=https://yourdburl.firebaseio.com
VITE_FIREBASE_PROJECT_ID=yourproject-id
VITE_FIREBASE_STORAGE_BUCKET=yourstoragebucket.appspot.com
VITE_FIREBASE_MSG_SENDER_ID=43597918523958
VITE_FIREBASE_APP_ID=234598789798798fg3-034

Indexes

What should be set up in indexes (cloud Firestore) to get the filter running

Could not reach Cloud Firestore backend

I keep getting this error on Sign Up

@firebase/firestore: Firestore (8.10.1): Could not reach Cloud Firestore backend. Connection failed 1 
times. Most recent error: FirebaseError: [code=failed-precondition]: The Cloud Firestore API is not 
available for Firestore in Datastore Mode database projects/myproject-54492/databases/(default).

This typically indicates that your device does not have a healthy Internet connection at the moment. 
The client will operate in offline mode until it is able to successfully connect to the backend.

Adding color select and size select option in products card

Sir if a person wants to order the product (eg. The glasses) but of different color so how to add color select option in the product Modal section so that he can choose the colour varient and then add to the basket the specific varient of that product.
Will be thankful if you help.

npm run dev-server causes an error

Hey there!

So I have encountered an error when running npm run dev-server. I have made the env file and put my config there to the correct values but for some reason it gives me this error message:

"FirebaseError: projectId must be a string in FirebaseApp.options"

If you know how to fix this issue that will be great.

Thanks,
Khizer

Getting 'Product thumbnail image is required' alert when I try to update an existing product.

Hi Julius,
First of all, thanks alot for this wonderful e-commerce app and making it available to community for free.. :-)

Now to the issue.
error

From admin view, when I try to edit a product and submit the changes, I always get this message 'Product thumbnail image is required.'

I can see the thumbnail is loaded in the edit view, but somehow submit doesnt work without reuploading the thumbnail using 'choose image' button.

This is not as we may not be having the thumbnail copy of the product image all the time.

I am not able to retrieve products

I created a database for products but not able to get them. Can you please share the screenshot of your database
this is the error i am getting
SharedScreenshot

Mobile Field doesn't accept input - onChange

Hello @jgudo ,

I am unable to input the mobile number on the EditProfile and shipping form.

<ReactPhoneInput
defaultCountry={'in'}
disabled={isLoading}
inputClass={'input-form d-block '}
inputExtraProps={{ required: true }}
masks={{ in: '+.. .....-.....' }}
onChange={onMobileChange}
placeholder="9876543210"
value={field.mobile}
/>

Step by step guide to setup locally

Is there any step by step guide to setup locally...

I am even struggling to find out what to get from where and put it into env file, I know it's all firebase related but I am new to firebase

thanks

Multi admin features (Multi vendors)

Sir if there are more than one admin (vendor). One admin(vendor) can easily edit the product details added by the other admin (vendor).Can you restrict the edit option of the admin (vendor)to the products he has added by himself only.And create a super admin who can access and edit all the products added by the other admins.It will be a great feature.

"npm install" issue in ubuntu

st package, see request/request#3142

[email protected] install /root/ecommerce-react/node_modules/node-sass
node scripts/install.js

internal/modules/cjs/loader.js:883
throw err;
^

Error: Cannot find module '/root/ecommerce-react/node_modules/node-sass/scripts/install.js'
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 internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.1.2 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-04-17T04_22_41_515Z-debug.log

how do i solve it?

problem with dev-server

[webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.options has an unknown property 'clientLogLevel'. These properties are valid: object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, magicHtml?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, server?, setupExitSignals?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }

good day @jgudo mr Julius. really thankyou for this amazing work. i ve got problem above. can you help me please

thank you
all the best for you

Blank page.

Hi.
Firstly - solid work coding the eCommerce site, it looks sick!

I installed the dependencies, did all I should (I believe), and ran the code on my local port but I get a blank screen. VS code says the deployment was successful though.

Did I not do something right?
P.S I'm a noob

Select size and color compulsion

The products can be added to the basket without selecting size and color which creates confusion for the seller . Pls make select size and color required before add to basket at product view page

getting error while installing npm

getting error while installing npm some

npm WARN deprecated [email protected]: This loader has been deprecated. Please use eslint-webpack-plugin
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: The package has been renamed to open
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated @hapi/[email protected]: Switch to 'npm install joi'
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: Moved to 'npm install @sideway/address'
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see request/request#3142
npm ERR! Unexpected end of JSON input while parsing near '...r\nComment: https://o'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\DELL\AppData\Roaming\npm-cache_logs\2020-10-25T05_03_07_036Z-debug.log

Admin Page

Hello
when i click on add new product in admin page i found this error
### Uncaught ReferenceError: ADD_PRODUCT is not defined
at onClick (main.bundle.js:168002)
at HTMLUnknownElement.callCallback (main.bundle.js:105846)
at Object.invokeGuardedCallbackDev (main.bundle.js:105895)
at invokeGuardedCallback (main.bundle.js:105950)
at invokeGuardedCallbackAndCatchFirstError (main.bundle.js:105964)
at executeDispatch (main.bundle.js:106047)
at executeDispatchesInOrder (main.bundle.js:106072)
at executeDispatchesAndRelease (main.bundle.js:108936)
at executeDispatchesAndReleaseTopLevel (main.bundle.js:108945)
at forEachAccumulated (main.bundle.js:108917)

and also the when i click on user page it won't open.
please help me with that

Blank white screen

Hey, your work is amazing.
I got an issue,
I did npm install,
npm run dev-sever

It accepted to run on a localhost but shows a blank white

`USER@DavidJrGoogle MINGW64 /d/ecommerce-react
$ npm run dev-server

[email protected] dev-server D:\ecommerce-react
webpack serve --config webpack/dev.config.js

× 「wds」: Error: listen EADDRINUSE: address already in use 127.0.0.1:8080
at Server.setupListenHandle [as _listen2] (net.js:1313:16)
at listenInCluster (net.js:1361:12)
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1500:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:10) {
code: 'EADDRINUSE',
errno: -4091,
syscall: 'listen',
address: '127.0.0.1',
port: 8080
}
group-css-media-queries: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
× 「wdm」: assets by path static/ 4.94 MiB
assets by path static/.png 1.37 MiB 20 assets
assets by path static/
.jpg 3.57 MiB 2 assets
assets by path images/ 1.9 MiB
assets by path images/.png 1.79 MiB 5 assets
assets by path images/
.jpg 113 KiB
asset images/defaultBanner.accdc757f2c48d61f24c4fbcef2742fd.jpg 95.1 KiB [emitted] [immutable] [from: src/images/defaultBanner.jpg] (auxiliary name: main)
asset images/defaultAvatar.4e9edb2a624547982816014bf128fcd5.jpg 18.1 KiB [emitted] [immutable] [from: src/images/defaultAvatar.jpg] (auxiliary name: main)
assets by path js/*.js 14.5 MiB
asset js/main.bundle.js 14.5 MiB [emitted] (name: main)
asset js/src_views_account_components_UserAccountTab_jsx.bundle.js 11.2 KiB [emitted]
asset js/src_views_account_components_UserWishListTab_jsx.bundle.js 2.63 KiB [emitted]
asset js/src_views_account_components_UserOrdersTab_jsx.bundle.js 2.59 KiB [emitted]
asset index.html 478 bytes [emitted]
orphan modules 1.3 MiB [orphan] 1621 modules
runtime modules 6.44 KiB 13 modules
built modules 5.13 MiB [built]
modules by path ./node_modules/ 4.77 MiB 810 modules
modules by path ./src/ 370 KiB 123 modules
./static/logo-wordmark.png 101 bytes [built] [code generated]

ERROR in ./node_modules/normalize.css/normalize.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
D:\ecommerce-react\node_modules\sass-loader\dist\index.js:7
export { __default as default };
^^^^^^

SyntaxError: Unexpected token 'export'
at wrapSafe (internal/modules/cjs/loader.js:1063:16)
at Module._compile (internal/modules/cjs/loader.js:1111:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (D:\ecommerce-react\node_modules\sass-loader\dist\cjs.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at processResult (D:\ecommerce-react\node_modules\webpack\lib\NormalModule.js:751:19)
at D:\ecommerce-react\node_modules\webpack\lib\NormalModule.js:853:5
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:399:11
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:185:11
at loadLoader (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:33:11)
at iteratePitchingLoaders (D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:182:2)
at iteratePitchingLoaders (D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:178:10)
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:189:18
at handleResult (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:53:2)
at loadLoader (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:35:10)
@ ./src/index.jsx 2:0-37

ERROR in ./node_modules/react-phone-input-2/lib/style.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
D:\ecommerce-react\node_modules\sass-loader\dist\index.js:7
export { __default as default };
^^^^^^

SyntaxError: Unexpected token 'export'
at wrapSafe (internal/modules/cjs/loader.js:1063:16)
at Module._compile (internal/modules/cjs/loader.js:1111:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (D:\ecommerce-react\node_modules\sass-loader\dist\cjs.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at processResult (D:\ecommerce-react\node_modules\webpack\lib\NormalModule.js:751:19)
at D:\ecommerce-react\node_modules\webpack\lib\NormalModule.js:853:5
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:399:11
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:185:11
at loadLoader (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:33:11)
at iteratePitchingLoaders (D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:182:2)
at iteratePitchingLoaders (D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:178:10)
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:189:18
at handleResult (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:53:2)
at loadLoader (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:35:10)
@ ./src/index.jsx 5:0-43

ERROR in ./src/styles/style.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
D:\ecommerce-react\node_modules\sass-loader\dist\index.js:7
export { __default as default };
^^^^^^

SyntaxError: Unexpected token 'export'
at wrapSafe (internal/modules/cjs/loader.js:1063:16)
at Module._compile (internal/modules/cjs/loader.js:1111:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (D:\ecommerce-react\node_modules\sass-loader\dist\cjs.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at processResult (D:\ecommerce-react\node_modules\webpack\lib\NormalModule.js:751:19)
at D:\ecommerce-react\node_modules\webpack\lib\NormalModule.js:853:5
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:399:11
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:185:11
at loadLoader (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:33:11)
at iteratePitchingLoaders (D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:182:2)
at iteratePitchingLoaders (D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:178:10)
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:189:18
at handleResult (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:53:2)
at loadLoader (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:35:10)
@ ./src/index.jsx 8:0-27

3 ERRORS in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack 5.61.0 compiled with 6 errors in 75676 ms
i 「wdm」: Failed to compile.
i 「wdm」: Compiling...
× 「wdm」: assets by status 21.3 MiB [cached] 33 assets
asset index.html 478 bytes [emitted]
cached modules 6.43 MiB (javascript) 6.44 KiB (runtime) [cached] 2625 modules
javascript modules 117 bytes
./node_modules/normalize.css/normalize.css 39 bytes [built] [1 error]
./node_modules/react-phone-input-2/lib/style.css 39 bytes [built] [1 error]
./src/styles/style.scss 39 bytes [built] [1 error]

ERROR in ./node_modules/normalize.css/normalize.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
D:\ecommerce-react\node_modules\sass-loader\dist\index.js:7
export { __default as default };
^^^^^^

SyntaxError: Unexpected token 'export'
at wrapSafe (internal/modules/cjs/loader.js:1063:16)
at Module._compile (internal/modules/cjs/loader.js:1111:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (D:\ecommerce-react\node_modules\sass-loader\dist\cjs.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at processResult (D:\ecommerce-react\node_modules\webpack\lib\NormalModule.js:751:19)
at D:\ecommerce-react\node_modules\webpack\lib\NormalModule.js:853:5
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:399:11
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:185:11
at loadLoader (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:33:11)
at iteratePitchingLoaders (D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:182:2)
at iteratePitchingLoaders (D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:178:10)
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:189:18
at handleResult (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:53:2)
at loadLoader (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:35:10)
@ ./src/index.jsx 2:0-37

ERROR in ./node_modules/react-phone-input-2/lib/style.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
D:\ecommerce-react\node_modules\sass-loader\dist\index.js:7
export { __default as default };
^^^^^^

SyntaxError: Unexpected token 'export'
at wrapSafe (internal/modules/cjs/loader.js:1063:16)
at Module._compile (internal/modules/cjs/loader.js:1111:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (D:\ecommerce-react\node_modules\sass-loader\dist\cjs.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at processResult (D:\ecommerce-react\node_modules\webpack\lib\NormalModule.js:751:19)
at D:\ecommerce-react\node_modules\webpack\lib\NormalModule.js:853:5
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:399:11
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:185:11
at loadLoader (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:33:11)
at iteratePitchingLoaders (D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:182:2)
at iteratePitchingLoaders (D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:178:10)
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:189:18
at handleResult (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:53:2)
at loadLoader (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:35:10)
@ ./src/index.jsx 5:0-43

ERROR in ./src/styles/style.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
D:\ecommerce-react\node_modules\sass-loader\dist\index.js:7
export { __default as default };
^^^^^^

SyntaxError: Unexpected token 'export'
at wrapSafe (internal/modules/cjs/loader.js:1063:16)
at Module._compile (internal/modules/cjs/loader.js:1111:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (D:\ecommerce-react\node_modules\sass-loader\dist\cjs.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at processResult (D:\ecommerce-react\node_modules\webpack\lib\NormalModule.js:751:19)
at D:\ecommerce-react\node_modules\webpack\lib\NormalModule.js:853:5
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:399:11
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:185:11
at loadLoader (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:33:11)
at iteratePitchingLoaders (D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:182:2)
at iteratePitchingLoaders (D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:178:10)
at D:\ecommerce-react\node_modules\loader-runner\lib\LoaderRunner.js:189:18
at handleResult (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:53:2)
at loadLoader (D:\ecommerce-react\node_modules\loader-runner\lib\loadLoader.js:35:10)
@ ./src/index.jsx 8:0-27

3 ERRORS in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack 5.61.0 compiled with 6 errors in 1985 ms
i 「wdm」: Failed to compile.

`

screen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.