creativetimofficial / ct-material-dashboard-pro

Material Dashboard Pro - Premium Bootstrap 5 Admin
https://demos.creative-tim.com/material-dashboard-pro/pages/dashboards/analytics
116 stars 28 forks source link

[Bug] Node error: ReferenceError: primordials is not defined #351

Closed Alhar6i closed 1 year ago

Alhar6i commented 1 year ago

Version

3.0.5

Reproduction link

https://www.creative-tim.com/downloads

Operating System

windows

Device

PC

Browser & Version

NA

Steps to reproduce

Download the last version 1- run (npm install) to install it you will receive lots of warnings, don't worry keep waiting :) 2-run (npm audit fix --force) to fix some of the vulnerabilities 3- run (npm start) to start the material to get the error

material-dashboard-pro@3.0.5 start npm run open-app

material-dashboard-pro@3.0.5 open-app gulp open-app

fs.js:47 } = primordials; ^

ReferenceError: primordials is not defined at fs.js:47:5 at req_ (D:\Tools\Material-Dashboard\material-dashboard-pro-html-v3.0.5\material-dashboard-pro-html-v3.0.5\node_modules\natives\index.js:143:24) at Object.req [as require] (D:\Tools\Material-Dashboard\material-dashboard-pro-html-v3.0.5\material-dashboard-pro-html-v3.0.5\node_modules\natives\index.js:55:10) at Object. (D:\Tools\Material-Dashboard\material-dashboard-pro-html-v3.0.5\material-dashboard-pro-html-v3.0.5\node_modules\vinyl-fs\node_modules\graceful-fs\fs.js:1:37) at Module._compile (node:internal/modules/cjs/loader:1103:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18)

What is expected?

see the index page

What is actually happening?

break


Solution

Additional comments

groovemen commented 1 year ago

Hello @Alhar6i,

Thank you for using our products, we tried to run the downloadable archive and it worked properly. Please try to use a different version of NodeJS. If you have the latest version, please try to downgrade to v15.x.x and try to use the product again and let us know if it's working.

All the best, Stefan

Alhar6i commented 1 year ago

Sorry, downgrading the node version is not a solution! Why should one use an out-of-date product? do you agree?

groovemen commented 1 year ago

Hello again,

Please let us know your node version because we have tested with the 16.14.0 and it's working properly.

Best, Stefan

Alhar6i commented 1 year ago

Our node version is 16.14.2

groovemen commented 1 year ago

Hello again,

Please make sure that in the package.json you have the version 4.0.2 for the gulp in devDependencies.

"devDependencies": {
    "gulp": "^4.0.2",
    ....
 }

After you change it, delete the node_module and package.json.lock and run the npm install command again. We have tested also with the v17.7.2 node version and it's working properly.

All the best, Stefan