windows 10 - npm i #truffle/contract [closed] - smartcontracts

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Can't install truffle contracts, see Error 1.
ERROR 1:
C:\Vote>npm i #truffle/contract
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git#github.com/web3 js/WebSocket-Node.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\laure\AppData\Roaming\npm-cache_logs\2019-11-11T03_41_13_180Z-debug.log
I think Error 2, happens because I haven't installed truffle contract also Error 2 happens on a local web page.
ERROR 2:
Uncaught (in promise) ReferenceError: TruffleContract is not defined
at Object.loadContract (app.js:56)
at async Object.load (app.js:8)

The give away is this line in your error log:
npm ERR! enoent spawn git ENOENT
Basically, it means that the command git was not found and thus can not be executed.
Make sure you have installed git and added it to your environment PATH before running this install command again.

Related

The development server returned error code 500

I want to run react-navigation.
It gives me this error for gesture handler. While I'm going to install gesture handler, the following error occurs.
Kindly give me the appropriate solution.
C:\Users\Farooq\FirstActivity>npm install --save react-native-gesture-handler
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/naver/hammer.js.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Farooq\AppData\Roaming\npm-cache\_logs\2020-02-11T21_17_29_196Z-debug.log
This is typical issue with windows environment.
First of all download git for windows from here
Then follow bellow steps
Open Your Environment Variables
Edit Path
Find your git location that been installed in your device. Example is C:\Program Files\Git\cmd
Add the git location to Path (make sure to add this to both user variables and system variables)
Apply the changes and restart your pc
Lastly, go back to your project and run npm install react-native-gesture-handler

What should be the solution of the following problem?

I am trying to create a new React-Native project but I am getting the following error stack trace:
C:\Users\MY HP\Desktop\MyProjects\ReactNative\project01>expo init RunAtleast
? Choose a template: expo-template-blank
√ Please enter a few initial configuration values.
Read more: https://docs.expo.io/versions/latest/workflow/configuration/ · 100% completed
Extracting project files...
Customizing project...
Installing dependencies...
npm WARN deprecated core-js#1.2.7: core-js#<2.6.5 is no longer maintained. Please, upgrade to core-js#3 or at least to actual version of core-js#2.
npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git#github.com/expo/react-native-maps.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\MY HP\AppData\Roaming\npm-cache\_logs\2019-04-04T18_59_55_657Z-debug.log
Process exited with non-zero code: 1
Set EXPO_DEBUG=true in your env to view the stack trace.
Does anyone have any ideas on how to fix this error? Any help would be greatly appreciated!
Looks like the problem is with your installation of git under Windows. A quick search turned up this link: https://github.com/amplience/cms-javascript-sdk/issues/1
Perhaps you can find more ideas how to fix this following the discussion there?
It has been solves as I used npm cache clear --force and reinstalled npm install -g expo-cli. And the problem gets solved..thanks to the stackovelflow community for such types of help..

How to fix react native expo starting code?

When I type the normal expo code and start my project, I get the following error:
npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git#github.com/expo/react-native-maps.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Atharva Sawant\AppData\Roaming\npm-cache\_logs\2019-03-27T17_07_14_954Z-debug.log
Process exited with non-zero code: 1
Set EXPO_DEBUG=true in your env to view the stack trace.
I searched for errors and found a solution.
I drew up the answer by referring to the link.
I was able to get it to work by first installing Git for Windows as mentioned earlier https://git-for-windows.github.io/.
Then, instead of opening up a regular command prompt and issuing the apm install command, go to your Windows Start menu and open up Git CMD. Run the command there and it should work.
or
you try add GIT to $PATH
If you can't use Set, try adding it using Setx.
Syntax example is:
setx PATH "%PATH%;C:\Program Files\MySQL\MySQL Server 5.5\bin" /M
If you have any further questions, please leave a comment.

Problems in creating CRNA

Im just stared learning react Native, and while creating a CRNA I had this :
`C:\Users\Mohamed\Documents\Projet> expo init MoviesAndMe
? Choose a template: expo-template-blank
? Choose which workflow to use: managed
√ Please enter a few initial configuration values.
Read more: https://docs.expo.io/versions/latest/workflow/configuration · 100% completed
[17:21:41] Extracting project files...
[17:21:45] Customizing project...
[17:21:45] Installing dependencies...
npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git#github.com/expo/react-native-maps.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Mohamed\AppData\Roaming\npm-cache\_logs\2019-02-17T16_22_16_022Z-debug.log
[17:22:16] Process exited with non-zero code: 1
[17:22:16] Set EXPO_DEBUG=true in your env to view the stack trace.`

packages not installing - "Error: tunneling socket could not be established" [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Debian squeeze (Internet connection running through Tor), nodejs built from the current source - the error has only just started occuring:
root#...# npm install coffee-script
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/coffee-script
npm ERR! Error: tunneling socket could not be established, cause=socket hang up
npm ERR! at ClientRequest.onError (/usr/local/lib/node_modules/npm/node_modules/request/tunnel.js:161:17)
npm ERR! at ClientRequest.g (events.js:193:14)
npm ERR! at ClientRequest.EventEmitter.emit (events.js:93:17)
npm ERR! at CleartextStream.socketErrorListener (http.js:1330:9)
npm ERR! at CleartextStream.EventEmitter.emit (events.js:93:17)
npm ERR! at SecurePair.exports.connect.cleartext._controlReleased (tls.js:1298:15)
npm ERR! at SecurePair.EventEmitter.emit (events.js:93:17)
npm ERR! at SecurePair.error (tls.js:952:10)
npm ERR! at EncryptedStream.CryptoStream._done (tls.js:432:17)
npm ERR! at EncryptedStream.CryptoStream._pull (tls.js:577:12)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 3.2.0-3-486
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "coffee-script"
npm ERR! cwd /home/...
npm ERR! node -v v0.8.11
npm ERR! npm -v 1.1.62
npm ERR! code ECONNRESET
npm ERR!
...
npm ERR! not ok code 0
Iceweasel is also showing an invalid security certificate error for https://registry.npmjs.org/coffee-script.
Anyone any idea what is missing here? (It has occured in the past, fixed itself though for some odd reason.)
Tried setting ca and strict-ssl config options (null and false resp.), didn't work, however setting the registry config option to http://registry.npmjs.org/ and packages are installing again - should this be an ssl domain then?