creativetimofficial / ct-light-bootstrap-dashboard-pro-react

LBD Pro React Version
20 stars 8 forks source link

NODE_PATH not recognized by windows #9

Closed sgarmendia closed 6 years ago

sgarmendia commented 6 years ago

How can I run the app with npm start in windows enviroment ? This is the error I get after npm start =>

'NODE_PATH' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! light-bootstrap-dashboard-pro-react@1.0.0 start: `NODE_PATH=./src npm-run-all -p watch-css start-js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the light-bootstrap-dashboard-pro-react@1.0.0 start 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!     C:\Users\(...)
einazare commented 6 years ago

Hello @sgarmendia ,

Thank you for using our product. This error occurs because you may not have installed globally cross-env. If you install corss-env (npm install --g cross-env) you should not have the error anymore.

If this doesn't work, please let me know.

Best, Manu

sgarmendia commented 6 years ago

Thank you Manu!

It works like a charm, just have to follow instructions from cross-env npm

On Fri, Feb 9, 2018 at 07:52 Nazare Emanuel-Ioan notifications@github.com wrote:

Hello @sgarmendia https://github.com/sgarmendia ,

Thank you for using our product. This error occurs because you may not have installed globally cross-env. If you install corss-env (npm install --g cross-env) you should not have the error anymore.

If this doesn't work, please let me know.

Best, Manu

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/creativetimofficial/lbd-pro-react/issues/9#issuecomment-364351132, or mute the thread https://github.com/notifications/unsubscribe-auth/AYlVA9tujgP9rEOpV9ef0U87KCWr3moJks5tS-tIgaJpZM4R_M7e .

-- SG

CeoFred commented 5 years ago

Still having issues after installing cross-env

einazare commented 5 years ago

Hello there, @CeoFred ,

Can you also replace "start": "NODE_PATH=./src npm-run-all -p watch-css start-js", with "start": "npm-run-all -p watch-css start-js", and then, create a file named .env add it inside your root project and add this line in it: NODE_PATH=./src.

Best, Manu

FurkanKeskin commented 5 years ago

Still having issues after installing cross-env

Same here, I have installed the cross-env package but nothing changes. I'm getting this error:

'NODE_PATH' is not recognized as an internal or external command, operable program or batch file.

einazare commented 5 years ago

Helo there @FurkanKeskin ,

Are you using an IDE? Or the terminal? If you use the terminal inside the project, does the error still occurs? Take a look at this tutorial about using the terminal: https://www.youtube.com/watch?v=-E1S8lJPXyY

Best, Manu

sdsz65 commented 4 years ago

Hi, I have the same error when i run npm start

'NODE_PATH' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! online-store-back-office@0.1.0 start: `NODE_PATH=src:src/components:src/containers PORT=3002 react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the online-store-back-office@0.1.0 start 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!     C:\Users\Davood\AppData\Roaming\npm-cache\_logs\2020-05-13T07_42_47_356Z-debug.log
einazare commented 4 years ago

Hello there, @sdsz65 ,

Please change the react-scripts version inside package.json to the latest version. That should solve your issue.

Best, Manu

sdsz65 commented 4 years ago

Hello @EINazare ,

Thanks for your response. I change the react-scripts version but that don't solve my issue.

"react-scripts": "^3.4.1",

einazare commented 4 years ago

Hello again, @sdsz65 ,

Please make me the following video:

My best guess at the moment, is that you are not using the latest LTS version of NodeJS, but I'll learn more from the mentioned video.

Best, Manu

sdsz65 commented 4 years ago

Hi EINazare,

I remove NODE_PATH from start script, and add .env file with "PORT=3002" content. This solve my issue

thanks for your time

matiasgutierrezok commented 4 years ago

Hi, I seem to have the same problem. I tried what you all said here, but it didn't work. Here's a screenshot about the error. https://drive.google.com/file/d/11S0AekvGSb_dORUl7yAJR8C9bydtLhJI/view?usp=sharing

einazare commented 4 years ago

Hello there, @matiasgutierrezok ,

Please provide us with the following video:

If you do not want to share this content publicly, due to GDPR etc., you can send the video to my work email, here: manu@creative-tim.com

Best, Manu