میلاد-م
5 سال پیش توسط میلاد-م مطرح شد
6 پاسخ

خطا هنگام نصب بسته ی node sass

با سلام، من می خوام بسته ی node-sass رو از طریق NPM نصب کنم، ولی بهم خطای زیر رو میده.

D:\Serial\Roocket\webpack\0Files\03Tutorial-5>node -v
v12.13.0

D:\Serial\Roocket\webpack\0Files\03Tutorial-5>npm -v
6.12.0

D:\Serial\Roocket\webpack\0Files\03Tutorial-5>npm install node-sass

> node-sass@4.12.0 install D:\Serial\Roocket\webpack\0Files\03Tutorial-5\node_mo
dules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.1
2.0/win32-ia32-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.12.0/win
32-ia32-72_binding.node":

connect ECONNREFUSED 127.0.0.1:443

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@4.12.0 postinstall D:\Serial\Roocket\webpack\0Files\03Tutorial-5\nod
e_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe D:\Serial\Roocket\webpack\0Files\03Tu
torial-5\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext=
--libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'D:\\Serial\\Roocket\\webpack\\0Files\\03Tutorial-5\\node_modules
\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@12.13.0 | win32 | ia32
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (D:\Serial\Roocket\webpack\0File
s\03Tutorial-5\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\Serial\Roocket\webpack\0Files\03Tutorial-5\
node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\Serial\Roocket\webpack\0Files\03Tutorial-5\
node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\Serial\Roocket\webpack\0Files\03Tutorial-5\nod
e_modules\which\which.js:89:16
gyp verb `which` failed     at D:\Serial\Roocket\webpack\0Files\03Tutorial-5\nod
e_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\Serial\Roocket\webpack\0Files\03Tutorial-5\nod
e_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError (D:\Serial\Roocket\webpack\0File
s\03Tutorial-5\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\Serial\Roocket\webpack\0Files\03Tutorial-5\
node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\Serial\Roocket\webpack\0Files\03Tutorial-5\
node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\Serial\Roocket\webpack\0Files\03Tutorial-5\nod
e_modules\which\which.js:89:16
gyp verb `which` failed     at D:\Serial\Roocket\webpack\0Files\03Tutorial-5\nod
e_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\Serial\Roocket\webpack\0Files\03Tutorial-5\nod
e_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21) {
gyp verb `which` failed   stack: 'Error: not found: python2\n' +
gyp verb `which` failed     '    at getNotFoundError (D:\\Serial\\Roocket\\webpa
ck\\0Files\\03Tutorial-5\\node_modules\\which\\which.js:13:12)\n' +
gyp verb `which` failed     '    at F (D:\\Serial\\Roocket\\webpack\\0Files\\03T
utorial-5\\node_modules\\which\\which.js:68:19)\n' +
gyp verb `which` failed     '    at E (D:\\Serial\\Roocket\\webpack\\0Files\\03T
utorial-5\\node_modules\\which\\which.js:80:29)\n' +
gyp verb `which` failed     '    at D:\\Serial\\Roocket\\webpack\\0Files\\03Tuto
rial-5\\node_modules\\which\\which.js:89:16\n' +
gyp verb `which` failed     '    at D:\\Serial\\Roocket\\webpack\\0Files\\03Tuto
rial-5\\node_modules\\isexe\\index.js:42:5\n' +
gyp verb `which` failed     '    at D:\\Serial\\Roocket\\webpack\\0Files\\03Tuto
rial-5\\node_modules\\isexe\\windows.js:36:5\n' +
gyp verb `which` failed     '    at FSReqCallback.oncomplete (fs.js:158:21)',
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (D:\Serial\Roocket\webpack\0File
s\03Tutorial-5\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\Serial\Roocket\webpack\0Files\03Tutorial-5\
node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\Serial\Roocket\webpack\0Files\03Tutorial-5\
node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\Serial\Roocket\webpack\0Files\03Tutorial-5\nod
e_modules\which\which.js:89:16
gyp verb `which` failed     at D:\Serial\Roocket\webpack\0Files\03Tutorial-5\nod
e_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\Serial\Roocket\webpack\0Files\03Tutorial-5\nod
e_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21)
gyp verb `which` failed  python Error: not found: python
gyp verb `which` failed     at getNotFoundError (D:\Serial\Roocket\webpack\0File
s\03Tutorial-5\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\Serial\Roocket\webpack\0Files\03Tutorial-5\
node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\Serial\Roocket\webpack\0Files\03Tutorial-5\
node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\Serial\Roocket\webpack\0Files\03Tutorial-5\nod
e_modules\which\which.js:89:16
gyp verb `which` failed     at D:\Serial\Roocket\webpack\0Files\03Tutorial-5\nod
e_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\Serial\Roocket\webpack\0Files\03Tutorial-5\nod
e_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21) {
gyp verb `which` failed   stack: 'Error: not found: python\n' +
gyp verb `which` failed     '    at getNotFoundError (D:\\Serial\\Roocket\\webpa
ck\\0Files\\03Tutorial-5\\node_modules\\which\\which.js:13:12)\n' +
gyp verb `which` failed     '    at F (D:\\Serial\\Roocket\\webpack\\0Files\\03T
utorial-5\\node_modules\\which\\which.js:68:19)\n' +
gyp verb `which` failed     '    at E (D:\\Serial\\Roocket\\webpack\\0Files\\03T
utorial-5\\node_modules\\which\\which.js:80:29)\n' +
gyp verb `which` failed     '    at D:\\Serial\\Roocket\\webpack\\0Files\\03Tuto
rial-5\\node_modules\\which\\which.js:89:16\n' +
gyp verb `which` failed     '    at D:\\Serial\\Roocket\\webpack\\0Files\\03Tuto
rial-5\\node_modules\\isexe\\index.js:42:5\n' +
gyp verb `which` failed     '    at D:\\Serial\\Roocket\\webpack\\0Files\\03Tuto
rial-5\\node_modules\\isexe\\windows.js:36:5\n' +
gyp verb `which` failed     '    at FSReqCallback.oncomplete (fs.js:158:21)',
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (D:\Serial\Roocket\webpack\0File
s\03Tutorial-5\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (D:\Serial\Roocket\webpack\0Files
\03Tutorial-5\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack     at callback (D:\Serial\Roocket\webpack\0Files\03Tutorial-5\no
de_modules\graceful-fs\polyfills.js:295:20)
gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:158:21)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\Serial\\Roocket\\web
pack\\0Files\\03Tutorial-5\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
"--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass
_library="
gyp ERR! cwd D:\Serial\Roocket\webpack\0Files\03Tutorial-5\node_modules\node-sas
s
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN tutorial@1.0.0 No description
npm WARN tutorial@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fse
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"
})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.12.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.12.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Milad\AppData\Roaming\npm-cache\_logs\2019-10-23T18_37_44_
139Z-debug.log

D:\Serial\Roocket\webpack\0Files\03Tutorial-5>

D:\Serial\Roocket\webpack\0Files\03Tutorial-5>

توی اینترنت هم گشتم، ولی نتونستم راه حلش رو بفهمم. ممنون میشم دوستان راهنمایی کنند من رو.


ثبت پرسش جدید
علی بیات
تخصص : توسعه دهنده ارشد وب
@ali.bayat 5 سال پیش مطرح شد
0

درود

Cannot download "https://github.com/sass/node-sass/releases/download/v4.12.0/win
32-ia32-72_binding.node":

با شِکَن (shecan.ir) امتحان کردید؟


میلاد-م
تخصص : توسعه‌دهنده رابط کاربری - Fron...
@milad 5 سال پیش آپدیت شد
-3

@ali.bayat
ممنونم از شما جناب مهندس بیات

از فـیلترشکن خودم قبلش استفاده کرده بودم، ولی بازم درست کار نکرد. گمان کردم که خطا از بخش دیگه ای باشه.
به سایتی که نشانی دادید رفتم و ازون روش استفاده کردم، درست شدش. ممنونم از شما

یک سوالی: من بسته های دیگه ای رو هم با NPM نصب کرده بودم، مشکلی نداشتش. چرا با این بسته به مشکل خوردم؟


علی بیات
تخصص : توسعه دهنده ارشد وب
@ali.bayat 5 سال پیش مطرح شد
1

@milad

خواهش می‌کنم

گویا این پکیج در حین نصب یه سری فایل‌ها رو هم از گیت لود میکنه.. متن ارور هم اشاره می‌کرد که نمیتونه فایل رو دانلود کنه

عموما این مشکل به خاطر وابستگی های پکیج هم می‌تونه باشه.. اما در مورد شما گویا مشکل از کانکشن بوده چون نسخه های درست رو هم استفاده کردید:


بعضی مواقع دیگه هم به خاطر کش شدن فایل ها در فولدر npm-cache در سیستم هست که باید از cache clean استفاده کرد:

npm cache clean
یا
npm cache clean --force

پیروز باشید


هادی
تخصص : برنامه نویس
@hadighanbarii2020 2 سال پیش آپدیت شد
-1

با سلام و خسته نباشید به همه اعضایی و تیم خوب راکت
بنده هنگام نصب SASSبا این روبرو شدم ممنون میشم راهنمایی کنین
@milad

F:\\02-Web\\udemy\\Digisolvemy\\lakeview&gt;npm install node-sass --sav-dev  
npm WARN deprecated har-validator@5.1.5: this library is no longer supported  
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See <https://v8.dev/blog/math-random> for details.  
npm WARN deprecated request@2.88.2: request has been deprecated, see <https://github.com/request/request/issues/3142>

added 238 packages, and audited 239 packages in 3m

19 packages are looking for funding  
run `npm fund` for details

found 0 vulnerabilities

F:\\02-Web\\udemy\\Digisolvemy\\lakeview&gt;

میلاد-م
تخصص : توسعه‌دهنده رابط کاربری - Fron...
@milad 3 سال پیش مطرح شد
-2

@hadighanbarii2020
توصیه می کنم یک گفتگوی جدید ایجاد کنید و پیغام خطا رو هم به درستی و خوانا از طریق گزینه ی قرار دادن کدها، درج کنید. دوستان کمک تون خواهند کرد.


محمد
@zeroday76 10 ماه پیش آپدیت شد
0

 تصویر

سلام وقت بخیر.
من میخوامnode sass رو نصب کنم این ارور میده.چیکار باید کنم؟


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

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