Error creating project with Java with Jhipster

Asked

Viewed 172 times

1

I’m creating a project by Jhipster in windows 10.

When running the yo jhipster command and selecting the tools I will use I get the following error when creating the project:

C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(409): error C2039: 'ExternalAsciiStringResource' : is not a member of 'v8::String' [C:\Users\jackson\tes
te\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
          C:\Users\jackson\.node-gyp\4.2.1\include\node\v8.h(2081) : see declaration of 'v8::String'
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(409): error C2065: 'ExternalAsciiStringResource' : undeclared identifier [C:\Users\jackson\teste\node_mo
dules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(409): error C2065: 'resource' : undeclared identifier [C:\Users\jackson\teste\node_modules\karma\node_mo
dules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(409): error C2448: 'NanNew' : function-style initializer appears to be a function definition [C:\Users\j
ackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.v
cxproj]
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(430): error C2766: explicit specialization; 'v8::Local<v8::StringObject> NanNew<v8::StringObject,v8::Loc
al<v8::String>>(v8::Local<v8::String>)' has already been defined [C:\Users\jackson\teste\node_modules\karma\node_module
s\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
          C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\w
  s\node_modules\nan\nan.h(420) : see previous definition of 'NanNew'
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(447): error C2995: 'v8::Local<v8::RegExp> NanNew(v8::Local<v8::String>,v8::RegExp::Flags)' : function te
mplate has already been defined [C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.i
o-client\node_modules\ws\build\bufferutil.vcxproj]
          C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\w
  s\node_modules\nan\nan.h(438) : see declaration of 'NanNew'
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(459): error C2995: 'v8::Local<v8::RegExp> NanNew(v8::Local<v8::String>,v8::RegExp::Flags)' : function te
mplate has already been defined [C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.i
o-client\node_modules\ws\build\bufferutil.vcxproj]
          C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\w
  s\node_modules\nan\nan.h(450) : see declaration of 'NanNew'
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(767): error C3083: 'smalloc': the symbol to the left of a '::' must be a type [C:\Users\jackson\teste\no
de_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(767): error C2039: 'FreeCallback' : is not a member of 'node' [C:\Users\jackson\teste\node_modules\karma
\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(767): error C2061: syntax error : identifier 'FreeCallback' [C:\Users\jackson\teste\node_modules\karma\n
ode_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(770): error C2065: 'callback' : undeclared identifier [C:\Users\jackson\teste\node_modules\karma\node_mo
dules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(770): error C2065: 'hint' : undeclared identifier [C:\Users\jackson\teste\node_modules\karma\node_module
s\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(777): error C2665: 'node::Buffer::New' : none of the 4 overloads could convert all the argument types [C
:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\buf
ferutil.vcxproj]
          C:\Users\jackson\.node-gyp\4.2.1\include\node\node_buffer.h(43): could be 'v8::MaybeLocal<v8::Object> node::B
  uffer::New(v8::Isolate *,char *,size_t)'
          C:\Users\jackson\.node-gyp\4.2.1\include\node\node_buffer.h(31): or       'v8::MaybeLocal<v8::Object> node::B
  uffer::New(v8::Isolate *,v8::Local<v8::String>,node::encoding)'
          while trying to match the argument list '(v8::Isolate *, const char *, uint32_t)'
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(781): error C2664: 'v8::Local<v8::Object>::Local(const v8::Local<v8::Object> &)' : cannot convert argume
nt 1 from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' [C:\Users\jackson\teste\node_modules\karma\no
de_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
          Reason: cannot convert from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object>'
          No user-defined-conversion operator available that can perform this conversion, or the operator cannot be cal
  led
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(788): error C2039: 'Use' : is not a member of 'node::Buffer' [C:\Users\jackson\teste\node_modules\karma\
node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(788): error C3861: 'Use': identifier not found [C:\Users\jackson\teste\node_modules\karma\node_modules\s
ocket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Users\jackson\teste\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\node_mod
ules\nan\nan.h(1728): error C2039: 'IsExternalAscii' : is not a member of 'v8::String' [C:\Users\jackson\teste\node_mod
ules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]        
  • 1

    Are you using ES6? And what version of Node do you have?

  • I don’t know if Jhipster is using the new JS specification, but the version of Node is: v4.2.1, @Sergio

1 answer

1

I solved this problem by installing version 0.12.7 of Node.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.