I'm trying to npm run
HOT=1 node ./node_modules/.bin/react-native-webpack-server start --hot
getting this error:
> [email protected] hot /Users/user_name/Documents/dev/app
> HOT=1 node ./node_modules/.bin/react-native-webpack-server start --hot
Segmentation fault: 11
there was no such error 12 hours ago. Have no idea why does this happens.
1) Segmentation Fault (also known as SIGSEGV and is usually signal 11) occur when the program tries to write/read outside the memory allocated for it or when writing memory which can only be read.In other words when the program tries to access the memory to which it doesn't have access to.
Segmentation faults are a common class of error in programs written in languages like C that provide low-level memory access and few to no safety checks. They arise primarily due to errors in use of pointers for virtual memory addressing, particularly illegal access.
This command runs the npm build command on the matched folders. This is useful when you install a new version of node, and must recompile all your C++ addons with the new binary. It is also useful when installing with --ignore-scripts and --no-bin-links , to explicitly choose which packages to build and/or link bins.
Core Dump/Segmentation fault is a specific kind of error caused by accessing memory that “does not belong to you.” When a piece of code tries to do read and write operation in a read only location in memory or freed block of memory, it is known as core dump. It is an error indicating memory corruption.
The suggestion to delete node_modules
and re-run npm install
is a good one. Even better, though: npm rebuild
will likely fix the problem and be faster (since it won't actually re-download all the files etc.).
There was a major node.js release yesterday, maybe that's why something went wrong. Best course of action is updating node.js/npm, deleting node_modules
folder and running npm install
to install dependencies again.
I also got this same error, and was down to a syntax error in one of my SASS files.
I also had the same issue now in my angularjs webpack project.
I checked the node version and npm
node -v
v8.11.3
npm -v
5.6.0
I updated the npm to the latest.
npm install -g npm@latest
npm -v
6.4.1
Now npm install, npm run build is working fine now. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With