PokeAPI / pokeapi.co

The PokéAPI documentation website
https://pokeapi.co
BSD 3-Clause "New" or "Revised" License
136 stars 52 forks source link

npm i error #109

Closed sashafirsov closed 2 years ago

sashafirsov commented 2 years ago

Trying to install project locally and it breaks in Win10 and Ubuntu. Tried latest and stable node with no luck.

npm ERR! In file included from /home/suns/.node-gyp/16.13.1/include/node/v8.h:30, npm ERR! from /home/suns/.node-gyp/16.13.1/include/node/node.h:63, npm ERR! from ../src/common.cc:22: npm ERR! /home/suns/.node-gyp/16.13.1/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’: npm ERR! /home/suns/.node-gyp/16.13.1/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’? npm ERR! 492 | !std::is_same<Data, std::remove_cv_t>::value>::Perform(data);

Please provide OS, node/npm compatible version you have successfully installed and run project

Naramsim commented 2 years ago

Hi! After deleting my node_modules I experienced various and funny similar errors all related to node-gyp. In the past 2 hours, I came to hate it!

So I decided to drop it altogether. Can you check out the branch gyp and do a clean installation?

sashafirsov commented 2 years ago

Thanks, npm install in gyp branch passed. The npm run start is giving errors though:

Running plugins... Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:130:10) at module.exports (C:\aWork\pokeapi.co\node_modules\webpack\lib\util\createHash.js:135:53) at NormalModule._initBuildHash (C:\aWork\pokeapi.co\node_modules\webpack\lib\NormalModule.js:417:16) at handleParseError (C:\aWork\pokeapi.co\node_modules\webpack\lib\NormalModule.js:471:10)

Naramsim commented 2 years ago

Hmm, for me it worked fine with Node16 and npm7. Which version are you running on?

Naramsim commented 2 years ago

ping @sashafirsov. Could you use the master branch, tell me your versions and maybe try to delete node_modules before installing?

sashafirsov commented 2 years ago

@Naramsim , in WSL ( Ubuntu in Windows ) npm i and npm start run fine now. Thanks.

Since click-through API preview is not something you considered worthy of integration into pokeapi.co, I could not make a good use of this fix.