راکت

شناخته نشدن npm

4 پاسخ

سلام من میخوام از react استفاده کنم و Node رو نصب کردم ولی وقتی میرم تو ترمینال vs code و دستور پایین رو مینویسم به ارور میخورم:

PS C:\Users\N A N O\Desktop\reactTwitter> npm init react-app .
npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:1

  • npm init react-app .
  • 
    + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
ثبت پرسش جدید

پاسخ‌ها

4
سبحان مولایی
سبحان مولایی
@websaz

تخصص: برنامه‌نویس وب: Python :: Django :: Node :: Php :: Laravel :: JS :: React :: React Native

سلام مطمئن بشید که Node رو به path اضافه کردید.
@MahdiKzn

مهدی کرم زادگان
مهدی کرم زادگان
@MahdiKzn

خیلی ممنون بابت پاسخگویی, اون ارور رفع شد ولی ...
الان متاسفانه چند روزه به یه ارور دیگه تو همون بخش خوردم و نمیدونم چجوری رفعش کنم.
این دستوریه که وارد کردم:
PS D:\reactTwitter> npm install -g create-react-app
اینم اروریه که خوردم:

npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path C:\Users\Firstname~1
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Users\Firstname~1'
npm ERR!  [OperationalError: EPERM: operation not permitted, mkdir 'C:\Users\Firstname~1'] {
npm ERR!   cause: [Error: EPERM: operation not permitted, mkdir 'C:\Users\Firstname~1'] {
npm ERR!     errno: -4048,
npm ERR!     code: 'EPERM',
npm ERR!     syscall: 'mkdir',
npm ERR!     path: 'C:\\Users\\Firstname~1'
npm ERR!   },
npm ERR!   isOperational: true,
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: 'C:\\Users\\Firstname~1'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

@websaz

شاید پاسخ شما همین‌جا باشد

Ali
Ali
@411proplayer

@MahdiKzn خود ریکت پیشنهاد میده از این کامند برا ساختن پروژه استفاده کنید چون هروقت پروژه جدید میسازید جدیدترین ورژن رو استفاده میکنه

npx create-react-app my-app

منبع

سبحان مولایی
سبحان مولایی
@websaz

تخصص: برنامه‌نویس وب: Python :: Django :: Node :: Php :: Laravel :: JS :: React :: React Native

این اررور به شما میگه که نمی تونه یک فولدر در c ایجاد کنه برای رفع مشکل cmd رو به صورت administrator ران کنید یا anti virus رو غیر فعال کنید. اطلاعات بیشتر

برای ارسال پاسخ لازم است وارد شده یا ثبت‌نام کنید

ورود یا ثبت‌نام