Hjälp att bygga ett befintligt projekt på Github

C, C++, Pascal, Assembly, Raspberry, Java, Matlab, Python, BASIC, SQL, PHP, etc.
Användarvisningsbild
Anahka1975
Inlägg: 1271
Blev medlem: 30 augusti 2006, 21:49:46
Ort: Säffle

Hjälp att bygga ett befintligt projekt på Github

Inlägg av Anahka1975 »

Hej

Hittade ett intressant projekt på webben jag skulle vilja titta närmare på och försöka lära mig lite från.
Detta https://www.hackster.io/sidlauskas/barb ... bot-0318aa
På Github https://github.com/sidlauskaslukas/barbot

Det är en drinkblandningsrobot och på Github finns kod till Arduino som kontrollerar hårdvaran och får kommandon via blåtand från en app i lämplig mobil enhet.
Det själva appen jag nu lagt 3 timmar på att försöka få till (kompilera).
Jag kommer ingenstans pga okunskap.

Har (tror jag) installerat alla förutsättningar för detta enligt guiden men får fel vid körningen av kommandot npm install

Kod: Markera allt

C:\client>npm install

> node-sass@4.5.0 install C:\client\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5
.0/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.0/win3
2-x64-64_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@4.5.0 postinstall C:\client\node_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\client\node_modules\node-gyp\bin\n
ode-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags=
 --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\client\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.8.0
gyp info using node@10.15.1 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\client\node_modules\which\wh
ich.js:13:12)
gyp verb `which` failed     at F (C:\client\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\client\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\client\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\client\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\client\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:154:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\client\node_modules\which\wh
ich.js:13:12)
gyp verb `which` failed     at F (C:\client\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\client\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\client\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\client\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\client\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:154:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python2\n    at getNotFoundError (
C:\\client\\node_modules\\which\\which.js:13:12)\n    at F (C:\\client\\node_mod
ules\\which\\which.js:68:19)\n    at E (C:\\client\\node_modules\\which\\which.j
s:80:29)\n    at C:\\client\\node_modules\\which\\which.js:89:16\n    at C:\\cli
ent\\node_modules\\isexe\\index.js:42:5\n    at C:\\client\\node_modules\\isexe\
\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:154:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (C:\client\node_modules\which\wh
ich.js:13:12)
gyp verb `which` failed     at F (C:\client\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\client\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\client\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\client\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\client\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:154:21)
gyp verb `which` failed  python { Error: not found: python
gyp verb `which` failed     at getNotFoundError (C:\client\node_modules\which\wh
ich.js:13:12)
gyp verb `which` failed     at F (C:\client\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\client\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\client\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\client\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\client\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:154:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python\n    at getNotFoundError (C
:\\client\\node_modules\\which\\which.js:13:12)\n    at F (C:\\client\\node_modu
les\\which\\which.js:68:19)\n    at E (C:\\client\\node_modules\\which\\which.js
:80:29)\n    at C:\\client\\node_modules\\which\\which.js:89:16\n    at C:\\clie
nt\\node_modules\\isexe\\index.js:42:5\n    at C:\\client\\node_modules\\isexe\\
windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:154:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\client\node_modules\node-gyp
\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\client\node_modules\node-gyp\
lib\configure.js:509:16)
gyp ERR! stack     at C:\client\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\client\\node_modules
\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_
cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\client\node_modules\node-sass
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fse
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.5.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.5.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\WalleriusEnginnering\AppData\Roaming\npm-cache\_logs\2019-
02-18T21_14_08_041Z-debug.log

C:\client>
Någon som fattar varför den inte hittar node-sass, eller rättare sagt vart editerar man sökvägen till det paketet?
Verkar ha hänt lite på den fronten sedan detta projekt startades.
Zkronk
Inlägg: 1423
Blev medlem: 23 augusti 2005, 16:44:36
Ort: Uppsala

Re: Hjälp att bygga ett befintligt projekt på Github

Inlägg av Zkronk »

Jag tror du ska kika närmare på dom här två raderna först:

Kod: Markera allt

gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
Har du Python 2.7 installerat?
I så fall behöver du lägga till en miljövariabel i Windows som talar om vart det är installerat...
https://superuser.com/questions/143119/ ... ndows-path
Användarvisningsbild
Anahka1975
Inlägg: 1271
Blev medlem: 30 augusti 2006, 21:49:46
Ort: Säffle

Re: Hjälp att bygga ett befintligt projekt på Github

Inlägg av Anahka1975 »

Tack, skall testas.
Tittade inte ens så långt ner i felen då den klagade på node-sass direkt.
Kan tillägga att gag provat i terminal i Android studio med samma resultat.
Användarvisningsbild
Klas-Kenny
Inlägg: 11292
Blev medlem: 17 maj 2010, 19:06:14
Ort: Växjö/Alvesta

Re: Hjälp att bygga ett befintligt projekt på Github

Inlägg av Klas-Kenny »

Varför installerar du en så gammal version utav node-sass?

Provade just att installera, ifrån en helt färsk node.js-installation under Windows, så fungerar "npm install node-sass" problemfritt.

Där emot ger "npm install node-sass@4.5.0" samma felmeddelande som du får. Vilket är rimligt, då filen i fråga inte verkar finnas på Github.
https://github.com/sass/node-sass/releases/tag/v4.5.0

Resten lär vara följdfel bara.
Användarvisningsbild
Anahka1975
Inlägg: 1271
Blev medlem: 30 augusti 2006, 21:49:46
Ort: Säffle

Re: Hjälp att bygga ett befintligt projekt på Github

Inlägg av Anahka1975 »

Klas-Kenny jag har inte en aning varför.
Jag anger kommandot "npm install" i client mappen (i Android Studio) och får detta felet.
Får även felet om att Python2 saknas fast jag lagt till i Path.

Hur gjorde du för att få det funka?
Användarvisningsbild
Anahka1975
Inlägg: 1271
Blev medlem: 30 augusti 2006, 21:49:46
Ort: Säffle

Re: Hjälp att bygga ett befintligt projekt på Github

Inlägg av Anahka1975 »

Jag kan också installera node-sass

Kod: Markera allt

C:\client>npm install node-sass

> node-sass@4.11.0 install C:\client\node_modules\node-sass
> node scripts/install.js

Cached binary found at C:\Users\WalleriusEnginnering\AppData\Roaming\npm-cache\n
ode-sass\4.11.0\win32-x64-64_binding.node

> node-sass@4.11.0 postinstall C:\client\node_modules\node-sass
> node scripts/build.js

Binary found at C:\client\node_modules\node-sass\vendor\win32-x64-64\binding.nod
e
Testing binary
Binary is fine
npm notice created a lockfile as package-lock.json. You should commit this file.

+ node-sass@4.11.0
added 90 packages from 78 contributors, removed 508 packages, moved 9 packages a
nd audited 644 packages in 12.037s
found 0 vulnerabilities
Men får fortfarande fel när jag kör kommandot npm install
Nu är det nått med msbuild.exe också (se slutet på dumpen från terminalen)
Får för mig att detta är nått enkelt dumt nybörjarfel.
Och detta kanske är ett projekt som är för avancerat att börja lära sig från.
Men om någon orkar titta på detta och knuffa mig i rätt riktning vore jag taksam.

Kod: Markera allt

C:\client>npm install
npm WARN deprecated babili@0.0.10: babili has been renamed to babel-minify. Plea
se update to babel-minify
npm WARN deprecated babel-preset-babili@0.0.10: babili has been renamed to babel
-minify. Please update to babel-preset-minify
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Bro
wserslist >3.0 config used in other tools.

> node-sass@4.5.0 install C:\client\node_modules\@ionic\app-scripts\node_modules
\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5
.0/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.0/win3
2-x64-64_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> node-sass@4.5.0 postinstall C:\client\node_modules\@ionic\app-scripts\node_mod
ules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\client\node_modules\node-gyp\bin\n
ode-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags=
 --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\client\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.8.0
gyp info using node@10.15.1 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 c:\Python2\python2.EXE
gyp verb check python version `c:\Python2\python2.EXE -c "import sys; print "2.7
.6
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node v
ersion: 10.15.1
gyp verb command install [ '10.15.1' ]
gyp verb install input version string "10.15.1"
gyp verb install installing version: 10.15.1
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 10.15.1
gyp verb build dir attempting to create "build" dir: C:\client\node_modules\@ion
ic\app-scripts\node_modules\node-sass\build
gyp verb build dir "build" dir needed to be created? C:\client\node_modules\@ion
ic\app-scripts\node_modules\node-sass\build
gyp verb Not using VS2017: Could not use PowerShell to find VS2017
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: C:\client\node_modules\@ioni
c\app-scripts\node_modules\node-sass\build\config.gypi
gyp verb config.gypi checking for gypi file: C:\client\node_modules\@ionic\app-s
cripts\node_modules\node-sass\config.gypi
gyp verb common.gypi checking for gypi file: C:\client\node_modules\@ionic\app-s
cripts\node_modules\node-sass\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn c:\Python2\python2.EXE
gyp info spawn args [ 'C:\\client\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\client\\node_modules\\@ionic\\app-scripts\\node_modul
es\\node-sass\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\client\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\WalleriusEnginnering\\.node-gyp\\10.15.1\\incl
ude\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\WalleriusEnginnering\\.node-gy
p\\10.15.1',
gyp info spawn args   '-Dnode_gyp_dir=C:\\client\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\Users\\WalleriusEnginnering\\.node-gy
p\\10.15.1\\<(target_arch)\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\client\\node_modules\\@ionic\\app-s
cripts\\node_modules\\node-sass',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\client\\node_modules\\@ionic\\app-scripts\\node_modul
es\\node-sass\\build',
gyp info spawn args   '-Goutput_dir=.' ]
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir C:\Users\WalleriusEnginnering\.node-gyp\10.15.1
gyp verb found first Solution file build/binding.sln
gyp verb `which` succeeded for `msbuild` C:\Windows\Microsoft.NET\Framework\v4.0
.30319\msbuild.EXE
gyp info spawn msbuild
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
Projekt i lösningen genereras ett åt gången. Lägg till växeln /m om du vill gene
rera flera projekt samtidigt.
Genereringen startade 2019-02-19 12:44:58.
Projektet C:\client\node_modules\@ionic\app-scripts\node_modules\node-sass\buil
d\binding.sln på nod 1 (standardmål).
ValidateSolutionConfiguration:
  Genererar lösningskonfigurationen Release|x64.
MSBUILD : error MSB3428: Det gick inte att läsa in Visual C++-komponenten VCBui
ld.exe. Du åtgärdar detta genom att installera .NET Framework 2.0 SDK, installe
ra Microsoft Visual Studio 2005 eller genom att lägga till sökvägen till kompon
enten i systemsökvägen om den är installerad på en annan plats.  [C:\client\nod
e_modules\@ionic\app-scripts\node_modules\node-sass\build\binding.sln]
Projektgenereringen av C:\client\node_modules\@ionic\app-scripts\node_modules\n
ode-sass\build\binding.sln (standardmål) misslyckades.


Genereringen misslyckades.

C:\client\node_modules\@ionic\app-scripts\node_modules\node-sass\build\binding.
sln (standardmål) (1) ->
(_src_\libsass mål) ->
  MSBUILD : error MSB3428: Det gick inte att läsa in Visual C++-komponenten VCB
uild.exe. Du åtgärdar detta genom att installera .NET Framework 2.0 SDK, instal
lera Microsoft Visual Studio 2005 eller genom att lägga till sökvägen till komp
onenten i systemsökvägen om den är installerad på en annan plats.  [C:\client\n
ode_modules\@ionic\app-scripts\node_modules\node-sass\build\binding.sln]

    0 varningar
    1 fel

Förfluten tid: 00:00:00.12
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\client\node_modules\node-gyp\lib\b
uild.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:248:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\client\\node_modules
\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_
cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\client\node_modules\@ionic\app-scripts\node_modules\node-sass
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fse
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.5.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.5.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\WalleriusEnginnering\AppData\Roaming\npm-cache\_logs\2019-
02-19T11_44_59_824Z-debug.log

C:\client>
Skriv svar