Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot conver t argument 1 from 'v8::Local<v8::Value>' to 'const v8::String::Utf8Value

I am trying to run two of the below commands :

npm install
npm audit fix

in VS Code when the below error is reported.

error C2664: 'v8::String::Utf8Value::Utf8Value(const v8::String::Utf8Value &)': cannot conver
t argument 1 from 'v8::Local<v8::Value>' to 'const v8::String::Utf8Value &

Any help to resolve this is much appreciated!!

like image 595
Keshav Pradeep Ramanath Avatar asked Nov 21 '19 09:11

Keshav Pradeep Ramanath


3 Answers

This described the issue, and this somewhat-hidden post helped me fix the buggy node-sass .cpp file to where I was able to proceed, using the version I wanted to.

I edited the node-sass create_string.cpp file, changing v8::String::Utf8Value string(value); to v8::String::Utf8Value string(v8::Isolate::GetCurrent(), value);.

like image 110
kackle123 Avatar answered Nov 04 '22 08:11

kackle123


Change Nodejs to version 10.19.0, node-sass not working with Nodejs 12.

like image 32
Jorge Guilherme Avatar answered Nov 04 '22 07:11

Jorge Guilherme


Change Nodejs version to [email protected] for nodeJS 12.

For more help go through this DOC

like image 32
Abdul Moeez Avatar answered Nov 04 '22 07:11

Abdul Moeez