0

i try to create a webpart using SPFX:

after running successfully :

yo @microsoft/sharepoint

Gulp version:

gulp -v 
CLI version 2.1.0 
Local version 3.9.1

node version:

v10.15.3

i run :

 gulp  trust-dev-cert

the error :

gulp trust-dev-cert[15356]: c:\ws\src\node_contextify.cc:626: Assertion `args[1]->IsString()' failed. 1: 00007FF67EA8F04A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+5114 2: 00007FF67EA6A0C6 node::MakeCallback+4518 3: 00007FF67EA6A17F node::MakeCallback+4703 4: 00007FF67EA3F630 node::DecodeWrite+13024 5: 00007FF67F26C122 v8::internal::OptimizingCompileDispatcher::Unblock+59890 6: 00007FF67F26D289 v8::internal::OptimizingCompileDispatcher::Unblock+64345 7: 00007FF67F26C5CC v8::internal::OptimizingCompileDispatcher::Unblock+61084 8: 00007FF67F26C4EB v8::internal::OptimizingCompileDispatcher::Unblock+60859 9: 0000024C9FC5C5C1

and when i try :

PS C:\spfx> gulp serve
gulp serve[4756]: c:\ws\src\node_contextify.cc:626: Assertion `args[1]->IsString()' failed.
 1: 00007FF67EA8F04A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+5114
 2: 00007FF67EA6A0C6 node::MakeCallback+4518
 3: 00007FF67EA6A17F node::MakeCallback+4703
 4: 00007FF67EA3F630 node::DecodeWrite+13024
 5: 00007FF67F26C122 v8::internal::OptimizingCompileDispatcher::Unblock+59890
 6: 00007FF67F26D289 v8::internal::OptimizingCompileDispatcher::Unblock+64345
 7: 00007FF67F26C5CC v8::internal::OptimizingCompileDispatcher::Unblock+61084
 8: 00007FF67F26C4EB v8::internal::OptimizingCompileDispatcher::Unblock+60859
 9: 000000CBC125C5C1

any idea?

  • 2
    2 things to note here, 1) please use 8.x version of node as that is the official supported version 2) ensure that you are executing the commands as the administrator i.e local machine admin – Gautam Sheth Apr 4 '19 at 17:31
0

Solution is delete node_modules dir and package-lock.json. Then run sudo npm install --unsafe-perm=true refence GitHub

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.