Bower.io. Installing dependencies - javascript

I have the latest version (as of this writing) 1.3.12. I am trying to install dependencies:
bower install
During installation I get an error:
bower ENORESTARGET No tag found that was able to satisfy ~2.0.3
Additional error details:
No versions found in git://github.com/theshock/atomjs.git
and installation aborted.
How to resolve this problem?
Thank

For the people who are still getting this problem on Windows even though they are sure that the packages have correct versions, problem might be caused by the console emulator.
As I found out here from the comment posted by m0n1ker, the problem was caused by ConEmu console emulator. He says:
Ok, I did some debugging and for those that are having issues with ConEmu, the issue is not with bower. Where bower makes the call value = cmd('git', ['ls-remote', '--tags', '--heads', source]).spread(function (stdout) { in GitRemoteResolver.js the stdout variable is getting truncated to 4096 characters. This is a bug in the ConEmuHk DLL.
I am using cmder console emulator and thanks to grafikkaos I was able to solve the problem by disabling Inject ConEmuHk under Settings -> Features -> In-console options. After doing that I can now install/update bower packages without any problem.

Related

HardHat Unable to download compiler versions list

So this is my first interaction with hardhat. I created a sample project using npx hardhat but for some reason, when I try to Run:
npx hardhat test
I get the following error:
Error HH502: Couldn't download compiler versions list. Please check your connection.
With the following error in the stack trace:
Caused by: FetchError: request to https://binaries.soliditylang.org/windows-amd64/list.json failed, reason: getaddrinfo EAI_AGAIN binaries.soliditylang.org
So I tried navigating to binaries.soliditylang.org with Chrome and I found out that I'm getting net::ERR_NAME_NOT_RESOLVED.
(I get this error even when I try to navigate to docs.soliditylang.org)
I understand it has something to do with DNS but I don't have a clue how to solve it.
I faced similar issue. However, for me hardhat is not able to download list of compiler versions behind corporate proxy. Tried a lot of things. No luck. After a lot of trial and errors, found a way to make this work. Download list.json
and keep it locally at C:\Users\<your-user>\AppData\Local\hardhat-nodejs\Cache\compilers\windows-amd64 (windows). Also, download the solidity compiler executable for windows (required version) from https://github.com/ethereum/solidity/releases and place it in the same folder mentioned above. Now, peruse your list.json and identify the object for the solc compiler version of interest. Rename the executable as with the long name given in path in that object. For e.g., if you need solc version 0.8.0, the path in list.json for 0.8.0 version is solc-windows-amd64-v0.8.4+commit.c7e474f2.exe. Use this to rename the downloaded executable. Now, run npm test. This should fix the issue.
There is also an interesting way to run the compiler within docker on windows. For this, follow the discussion here - https://github.com/NomicFoundation/hardhat/issues/1280
Adding an .env file to the root of the project with
HTTPS_PROXY = ...
Solved in https://github.com/NomicFoundation/hardhat/pull/1291
Had to sudo chmod -R 777 /Users/<username>/Library/Caches/hardhat-nodejs first.

ElectronJS npm start / bash: electron-forge: command not found

My System:
Mac OSX 10.14.6
Electron: 10.1.5
electron-forge: ^6.0.0-beta.54
I've been working on an Electron side project. I started it using electron-forge, I had a small application functioning just fine, I then set it aside for a couple weeks. Coming back to it, I tried running npm start and it did nothing but return to a new terminal line. So I tried electron-forge start and it returned bash: electron-forge: command not found.
I tried deleting my node_modules folder and reinstalling, I tried creating a new electron-forge boilerplate, and neither made a difference. I tried installing electron-forge globally, but it errored out on the second step, and I found several stackoverflow articles saying I shouldn't have electron-forge installed globally. I haven't changed anything (that I know of) on a system level, but it seems to be a system issue, rather than a package issue, but I'm not knowledgable enough to do anything other than Google the errors and see what stacksoverflow articles are out there, but no articles have helped.
I'd love any and all help, Electron has ceased working on my system completely, and I have no idea how to troubleshoot it. Thanks in advance!
I ended up deleting and re-installing Node and that seems to have fixed it. Still not sure what caused the initial issue, but it's working again. For those interested, here's the resources I used:
https://stackabuse.com/how-to-uninstall-node-js-from-mac-osx/
https://pawelgrzybek.com/install-nodejs-installer-vs-homebrew-vs-nvm/
Update:
I kept having issues running npm start. What finally worked was to create a new boilerplate project using the CLI and copy the contents of the package-lock.json to the old project. That finally launched the app.
I know this is an old question but, I had the same issue and instead of uninstalling Node, I used rm -rf node_modules then I used npm cache clean --force. I reinstalled my dependencies and electron-forge worked again.
Use the command below
npm install electron

Error: Cannot find module "rxjs/operators" in Ionic Angular

Im trying to run my Ionic project. It was working fine until some days ago, now I just can't run it, whatever I do. this error shows up! I tried removing Rxjs from package.json and node_modules, also commented out all the place I used Rxjs, still this error shows up. Tried in Ubuntu 16.04 with Node 8.9.0 and npm 4.5.0.
Also tried the same running in windows still shows the same error! How do I fix this?
try reinstalling rxjs of version 5.5.3 or newer
npm install #reactivex/rxjs#5.5.3
this issue seems to be fixed in version 5.5.3 https://github.com/ReactiveX/rxjs/issues/2971

npm not installing returns error consistently

I was trying to install this : Search git whodotheyserve. com but this error shows up consistently .No matter what i try. I have tried other version of npm they are installed but the
npm test
error shows up .
npm run-script task
too returns error
This happens consistently .Also i am following each step mentioned in source of this project.Image attached.Please help where am i wrong here. The file extension used here ls .I had no experience with these. Image link
Echo %PATH% image link
The build fails because you are using Windows instead of Linux.
This is clearly stated in the installation instructions you claim to have followed in your duplicate question.
notes
The build tasks rely on Linux shell commands such as pkill and rsync
so are unlikely to run on other OS's without some tweaks.
If you want to run this under windows, you should ask the repo maintainer for guidance.
You have to install python 2.7 and make sure it's in your PATH variable.
Try:
set PATH=%PATH%;C:\python2.7\python.exe
Replace C:\python2.7\python.exe with your actual python installation path
The issue here was that this was made to run on linux only.So ,it won't run on windows on which i was trying to run it.The issue arose as i was trying to install it on wrong OS.I have successfully installed it on linux.It works great.
I want to thank all those who contributed in helping me with this issue.Thanks a lot to all those who helped.

Uncaught Error: Module did not self-register

I try to use node-vlc with nw.js (v0.12.0-alpha2). When i launch my app without nw.js it works, but when i launch it with nw.js i got an error:
Uncaught Error: Module did not self-register.", source: /home/alexis/Bureau/dev/jukebox/node_modules/vlc/node_modules/ffi/node_modules/bindings/bindings.js (84)
I tried some commands with nw-gyp but it couldn't help me.
I am on Ubuntu 14, 64-bit.
If you've upgraded node then npm rebuild might fix this for you
For me:
rm -r node_modules then
npm install
I had a similar issue with another product and my fix was to change the version of node I was using. I was using 0.12.0 and changed back to 0.10.26.
Personally, I use NVM to handle node version changing. With NVM installed it's as simple as running
nvm use 0.10.26
Or setting the default version to 0.10.26
nvm alias default 0.10.26
Hopefully this helps you out - our issues came from different products but the solution may be the same.
I had similar problem.
/Users/user/NodeAddons/bridge/node_modules/bindings/bindings.js:83
Error: Module did not self-register.
In my case I was doing a C/C++ Add-on, and I had forgotten to export the add-on, in my main.cc was missing the code below:
void Init(v8::Handle<v8::Object> exports) {
NODE_SET_METHOD(exports, "method", method);
}
NODE_MODULE(method, Init);
Hope this helps others!
Thanks :)
I've add the same issue because I installed to modules as sudo...
Removing the node modules folder and reinstalling as normal user fixed it.
For me npm rebuild or npm update didn't work. I had to remove the node_modules folder and run npm install to install them again.
I once had this problem when creating a multi-file c++ addon. In my binding.gyp file I had:
"sources": ["src/*.cc", "src/*.h" ]
And my project contained several *.cc files. However, the NODE_MODULE() macro was called only on one file which imported the rest of the files. But node expects that it is called on the frist *.cc file listed in sources. So I had to change sources to explicitly add that file to the beginning
For me, running npm update worked
I was getting an internal error: Module did not self-register.
Deleted the node_modules folder
ran npm install
It worked just fine.
I had this error with Snappy. Was using Node 11. Checked Snappy's NPM page https://www.npmjs.com/package/snappy where they listed which versions of node they supported.
Deleting node_modules folder rm -rf node_modules and then reinstalling using the correct version of Node resolved it.
One of the versions they supported on Linux at the time of this writing was Node version 12.
nvm deactivate 11
nvm uninstall 11
nvm install 12
nvm use 12
Problem solved
Another cause of this problem: if you're using pm2, then after upgrading node you may need to reinstall pm2. Test whether pm2 is the issue by running your app
without pm2 node server.js
then with pm2: pm2 start server.js.
Proper way to update PM2 after updating Node.js
I had this same issue with 0.12 and io.js 1.3.0, reverting to Node.js 0.10 fixed the issue.
Rebuild your C++ add-ons.
Did you encounter something like this?
Module did not self-register: '…\node_modules\#u4\opencv4nodejs\build\Release\opencv4nodejs.node
It’s likely that you have just updated your Node.js. Once you updated your Node.js, you need to rebuild your C++ add-ons, Node.js packages written in C++.
Why
When you build Node.js’ C++ add-ons, they get compiled into require-able .node files and linked to the currently installed Node.js ABI library, which is not compatible with other versions of it. Your packages were built only compatible with the specific version of Node.js.
How
Firstly, try npm rebuild. If your C++-add-on-based packages have a build script, it’ll do. If it doesn’t, you need to manually build your C++ native add-on packages. Do again what you did when you were installing such packages. Refer to the building instructions in the packages’ documentations to rebuild them. Or try reinstalling (npm install) them.
I had the same problem. My script that was referencing a global reference script had an invalid reference. I took off that invalid reference and the error was gone. My error message had no indication of that particular invalid reference which made it harder to debug. But 'Uncaught Error: Module did not self-register' was the message I was getting.
This also happen in my other project. For some reason, it wouldn't recognize the reference path if one of the characters are uppercase. Even thought, the upper-casing was the correct spelling of the path.
I had this issue while setting up my Cypress project.
I found out the issue was caused because Cypress uses node from its bundle version by default (which was version 8.0 in my case) , whilst the package I wanted to use required the node version to be 10 or higher.
I did have node 12.0 installed on my machine but since cypress was not using that I had to add the line shown below in the settings file (cypress.json) to set the value for 'nodeVersion' to 'system', to tell cypress explicitly to use the node version installed on my machine.
Add this line to your settings file:
**"nodeVersion": "system"**

Categories