iaincollins / nextjs-starter

A starter project for Next.js with authentication
https://nextjs-starter.now.sh
ISC License
1.37k stars 423 forks source link

npm install error - remove package-lock.json before running npm i #121

Closed chanp-ark closed 4 years ago

chanp-ark commented 4 years ago

Problem: I ran the following commands as instructed in the READ.ME

git clone https://github.com/iaincollins/nextjs-starter.git
npm install

I expected everything to go well, since I've never had a problem previously with npm install right after cloning, but I got an error instead

The Error:

In file included from ../src/binding.cpp:1:
In file included from ../node_modules/nan/nan.h:223:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call, expected 2, have 1
  return v8::StringObject::New(value).As<v8::StringObject>();
         ~~~~~~~~~~~~~~~~~~~~~      ^
/Users/chanpark/.node-gyp/12.16.0/include/node/v8.h:5531:3: note: 'New' declared here
  static Local<Value> New(Isolate* isolate, Local<String> value);
  ^
In file included from ../src/binding.cpp:1:
In file included from ../node_modules/nan/nan.h:223:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:356:58: error: expected '(' for function-style cast or type construction
  return v8::StringObject::New(value).As<v8::StringObject>();
                                         ~~~~~~~~~~~~~~~~^
../node_modules/nan/nan_implementation_12_inl.h:356:60: error: expected expression
  return v8::StringObject::New(value).As<v8::StringObject>();
                                                           ^
In file included from ../src/binding.cpp:1:
In file included from ../node_modules/nan/nan.h:2722:
../node_modules/nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object,
      v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(persistent().IsNearDeath());
           ~~~~~~~~~~~~ ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from ../src/binding.cpp:1:
In file included from ../node_modules/nan/nan.h:2722:
../node_modules/nan/nan_object_wrap.h:127:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object,
      v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(wrap->handle_.IsNearDeath());
           ~~~~~~~~~~~~~ ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
2 warnings and 5 errors generated.

My System: Node: v12.16.0 npm: 6.13.4 macOS Mojave 10.14.6

Appreciate your help

chanp-ark commented 4 years ago

oops was already addressed in #115

remove package-lock.json then run npm i