MihaiValentin / lunr-languages

A collection of languages stemmers and stopwords for Lunr Javascript library
Other
430 stars 163 forks source link

Can "nodejieba" be as "devDependency" or "peerDependency" in lunr-languages? #73

Closed le0pard closed 3 years ago

le0pard commented 3 years ago

Main reason for this - due to this dependency package lunr-languages is not working on node.js 16:

gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/nodejieba/lib/index.o
In file included from ../lib/index.cpp:1:
In file included from ../lib/nodejieba.h:4:
In file included from ../lib/utils.h:4:
In file included from /Users/leo/Library/Caches/node-gyp/16.3.0/include/node/node.h:63:
In file included from /Users/leo/Library/Caches/node-gyp/16.3.0/include/node/v8.h:30:
/Users/leo/Library/Caches/node-gyp/16.3.0/include/node/v8-internal.h:452:38: error: no template named 'remove_cv_t' in namespace 'std'; did you mean 'remove_cv'?
            !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                ~~~~~^~~~~~~~~~~
                                     remove_cv
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:776:50: note: 'remove_cv' declared here
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
                                                 ^
1 error generated.
make: *** [Release/obj.target/nodejieba/lib/index.o] Error 1
MihaiValentin commented 3 years ago

Hi Alexey,

Can you try changing the package version to ^2.5.0 instead of ~2.3.0? Does it build with 2.5.0?

le0pard commented 3 years ago

nodejieba 2.5.0 compiles on node.js 16, but I need remove lunr-languages to resolve issue with nodejieba 2.3.0

adding nodejieba 2.5.0 add additional version in dependency tree. Which is not resolve dependency for lunr-languages.

Screenshot 2021-06-20 at 23 36 43 Screenshot 2021-06-20 at 23 36 06

MihaiValentin commented 3 years ago

I updated package.json to 2.5 version. Please let me know if a fresh npm install works well for you now!

Thanks!

le0pard commented 3 years ago

Thanks @MihaiValentin Issue resolved 👍