I'm currently building a react native app using typescript and when after running npm i bcrypt
node_modules
crash and says the error below:
ERROR in ./node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html 1:0 Module parse failed: Unexpected token (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders <!doctype html> | <html> | <head>
I tried removing bcrypt
and installing it back, but still getting that issue.
I also tried remove bcrypt
from package.json
, removed node_modules
and then re-installed node, and works, but when install bcrypt
back, it gives the same error.
Any idea?
npm --build-from-source install node-pre-gyp
? – Monstrositygyp
is a tool used by Node.js to compile modules written in C/C++. It is just a tool to aid compilation. Node does not ship with a C/C++ compiler by default. Do you have a C compiler and Python installed in your system? (weirdly gyp is written in Python) – Parapet