When I try to install solc (npm install solc or npm install -g solc) I actually can install it BUT when looking for it (through the command which solc) nothing shows up.
Another strange thing: when looking for solcjs (through the command which solc) i get the correct path where it is indeed installed.
Things which I have already tried : uninstalling solc and solcjs and then re-installing them (which led to the same problem)
Other details : when I am in node.js and i try to do something like var solc = require('solc') no errors arise. Pretty strange one may think, well that's two of us.
Thanks in advance.
Based on the solc command line usage documentation and this question on the ethereum stackexchange, you're not supposed to.
But, if you insist on doing so, it's best if you add solc's installation directory to your $PATH.
I'm answering my own question to share the knowledge my collegue has finally shared with me: for my issue the following commands solved the problem (I did not initially mentioned that i was working on a MacOs my bad).
Step 1: Uninstall all possible version of solc (npm uninstall solc)
Step 2: brew tap ethereum/ethereum
Step 3: brew install solidity
This led to the correct creation of the path where solc is installed
Related
I am a newbie to react-native and would like to start developing a react-native app.
I could have started developing by react-native-cli, but I heard there was something called Expo and a way to open an initial app with expo-cli.
I copied and pasted this code npm install -g eas-cli, but it gave me a huge long error message I put its screenshot below.
I have no idea about the system?? inside my computer.
I would be so grateful if anyone gives me a possible solution.
Thanks for your valuable time^^
=========== Edit ===========
So I read the first comment, and run this command on my Mac brew install nvm. It worked nicely and looked for more information for what to do from this point. Then I ran this command mkdir ~/.nvm, and I am stack now. I created a directory called .nvm, but so what from now??
Thanks a lot for taking your time to help me!!
You probably installed npm using sudo, or something like that.
I would recommend to install npm using nvm. It usually removes all those errors.
Some context: I've recently been trying to update a react native project that uses expo, since I have not worked on the project for about four months. I believe I finally was able to successfully upgrade the project as expo is starting. The issue is that I am now having some trouble with some of the newer modules I just installed with npm. This error seems to be coming from me not knowing how to use the commander module. Additionally, I do not believe that I have a thorough understanding of modulues in react native/expo. I am using ubuntu 20.04 via windows terminal.
Error:
I did go to the website mentioned in the error. I believe that this link - https://github.com/tj/commander.js#avoiding-option-name-clashes - is what will solve my problem. However, I am confused as to where I should put the example file and how to use it.
I am not very well versed in modules for react native/expo and it is quite possible that I do not need to use this module (I thought that installing it would make my react native program run, but that does not seem to be the case).
Thus, I am looking for advice on either how to use this module, or on whether or not I should be using these modules (after updating node and then expo, the following modules could not be found every time I ran npm start, so I decided to install them using sudo npm install module_name -g since some other stackoverflow/github pages recommended that):
fs-extra
terminal-link
chalk
getenv
commander
#expo/xdl
Any help would be appreciated, and I would be happy to provide any more information that would be relevant.
I was not able to figure out a way to make the project work with the above modules. So, I followed the advice of a post I made on the expo forums (I posted similar context there and also the answer that I wrote below).
If you do not want to click the link, here are the steps below:
Basically, I uninstalled expo using the following command: npm -g uninstall expo-cli --save && yarn global remove expo-cli. Then I proceeded to remove the .expo folder from my home directory. More details on these two steps can be found here.
After that, I reinstalled expo using npm install --global expo-cli, from the expo documentation, in the install section.
Then I closed my terminal, reopened it, and ran expo whoami. The command returned recommending an update, so I followed the provided update command (which I believe was just npm install --global expo-cli again).
I closed the terminal, reopened it, and ran expo whoami again. This time I was just met with "you are not logged into expo" (or something along those lines). So, everything seemed up to date.
I then went to project and ran npm start and it worked fine.
Note: You may need to use sudo for any uninstall and install commands above (your terminal will likely tell you if you do).
Note Clearing cache for npm and yarn may take some time. Additionally, the first time you run npm start may also take some time. I'd say all in all this took about two to three hours, but my computer is also not the best.
I have an electron/React app running. So after I install all packages I have to execute electron-rebuild so there are no version issues.
I install one package in the preinstall script: npm install better-sqlite3 --build-from-source --sqlite3=my sqlite amalgamation folder
Now the problem is that electron-rebuild/npm rebuild just installs better-sqlite3 and not better-sqlite3 with my customized amalgamation.
This makes it unusable for me because I need my customized version of sqlite.
Does anyone know how to solve this, how to make electron-rebuild/npm rebuild install that package with the extra parameters?
I created a library to fix this issue/get around it: https://www.npmjs.com/package/better-sqlite3-sqleet.
So the problem is solved for me, but it would be nice to still have an answer on the original question.
So I'm just setting up my Discord bot in a new machine. I used the latest Node version in LTS and I have Windows Build Tools installed.
But doing npm install, everything is going well until the part when the sqlite3 package is being installed. I have a log here for reference: https://pastebin.com/ktJ8VyZY
And another log straight from PowerShell: https://pastebin.com/d232rjJY
Before I had issues with Python and that has been resolved but right now I cannot pinpoint exactly what is the problem and I've been reading all lines related to gyp and the problem isn't really clear for me so I'm here if anyone can pinpoint the exact problem and the ways to solve it.
Thank you.
Package.json if needed: https://pastebin.com/ACh0mQRe
I am getting crazy with the node npm pathwatcher on FreeBSD-10-2.
I tried this with node 0.10.40, 0.12.x, 4.2.x but none worked
Just simple
npm install pathwatcher
then small test script
var p = require('pathwatcher')
What ever release of pathwatcher I choose (6.2.5 (latest), 4.1.0, 5.0.1) I get the errors (depend on release and node)
1. node_modules/pathwatcher/build/Release/pathwatcher.node: Undefined symbol "_Z12PlatformInitv"
2. module "pathwatcher" not found
The npm installation runs in any case without any error.
If I do the same on Debian/Ubuntu/MacOSX no problem.
What makes it special on BSD
Thanks or help
A long answer short :-)
After having this discussion thread on freebsd forum at:
https://forums.freebsd.org/threads/npm-pathwatcher-module-for-meteor-fails.53843/#post-302921
I created an update PR and that gots already merged
https://github.com/atom/node-pathwatcher/pull/95
So just use
npm install pathwatcher#6.3.0
Everythings works by now :-)