Zaid-Ajaj / tabula-rasa

Minimalistic real-worldish blogging platform, written entirely in F#, made as a learning reference for building large Elmish apps
199 stars 16 forks source link

Error while running build.cmd Watch #21

Closed imranypatel closed 4 years ago

imranypatel commented 4 years ago

Just cloned the repo and ran 'build.cmd Watch'. It keeps producing error as: C:\Program Files\dotnet\sdk\3.0.100\NuGet.targets(123,5): error : End of Central Directory record could not be found. [D:\Work\iprnd\fs\ZaidAjaj\tabula-rasa\Client\src\TabulaRasa.Client.fsproj] Running build failed.

Any suggestions?

Here is complete console output: Paket version 5.241.6 Extracted Paket.Restore.targets to: D:\Work\iprnd\fs\ZaidAjaj\tabula-rasa.paket\Paket.Restore.targets (Can be disabled with PAKET_SKIP_RESTORE_TARGETS=true) Starting full restore process. Performance:

The running order is:


Build Time Report

Target Duration


Clean 00:00:00.0104677 NpmInstall 00:01:39.9851236 DotnetRestore Failure Total: 00:01:56.4905687

Status: Failure


1) System.Exception: 'Client\src> cmd /C dotnet restore --no-cache' task failed at FSI_0005.Build.run(String fileName, String args, String workingDir) in D:\Work\iprnd\fs\ZaidAjaj\tabula-rasa\build.fsx:line 16 at FSI_0005.Build.clo@29-4.Invoke(String workingDir) in D:\Work\iprnd\fs\ZaidAjaj\tabula-rasa\build.fsx:line 29 at Microsoft.FSharp.Primitives.Basics.List.iter[T](FSharpFunc2 f, FSharpList1 x) at FSI_0005.Build.clo@27-3.Invoke(Unit _arg2) in D:\Work\iprnd\fs\ZaidAjaj\tabula-rasa\build.fsx:line 29 at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:line 626


Zaid-Ajaj commented 4 years ago

Hello @imranypatel, I have never seen that error before. It looks like a nuget problem. I will check it out

Zaid-Ajaj commented 4 years ago

Hmm can't find the issue, the project works fine here. Can you try removing the Nuget.config file you have and see if that fixes the issue?

imranypatel commented 4 years ago

@Zaid-Ajaj thank you for your prompt responses.

Removed Nuget.config file from cloned repo folder but error persists. Problem seems local to my system. Will try again after refreshing dotnet core sdk.

imranypatel commented 4 years ago

Problem persists even after updgraded dotnet core sdk from 3.1.100 to 3.1.101.

Zaid-Ajaj commented 4 years ago

Maybe it has something to do with elevated permissions, have you tried running your cmd.exe as admin?

imranypatel commented 4 years ago

Tried it but no luck.

Now navigating forums for clues on such kind of errors.

Zaid-Ajaj commented 4 years ago

Hmm, try deleting cached assets such as .paket and restart the watch process?

Zaid-Ajaj commented 4 years ago

The process log gives

D:\Work\iprnd\fs\ZaidAjaj\tabula-rasa.paket\Paket.Restore.targets

but it seems incorrect because there should be a slash between tabula-rasa and .paket, right?

imranypatel commented 4 years ago

'\.paket' is there in actual output but got tranformed into '.paket' while rendering github page.

Attached snapshot confirms it. tabula-rasa01

Search for resolution to the actual issue continues...

imranypatel commented 4 years ago

Target framework for: TabulaRasa.Server.fsproj -> dotnetcoreapp2.0 TabulaRasa.Client.fsproj -> netstandard2.0

My latest sdk is of framework dotnet core 3.1.101. No problems while restoring server project. Problem occurs while restoring client project. Could framework difference be an issue?

Zaid-Ajaj commented 4 years ago

Yeah it could be since this project need an update (even though it works locally just fine here and I have dotnet 3.1.100), try updating the client to netstandard2.1?

imranypatel commented 4 years ago

Changing TargetFramework to netstandard2.1 for client project is not working either.

thomrad commented 4 years ago

Same problem here, starts with dependency on python, I think.

Starting Target: NpmInstall (==> Clean, Clean, Clean) CWD: Client cmd /C yarn install yarn install v1.22.4 [1/4] Resolving packages... [2/4] Fetching packages... info fsevents@1.2.4: The platform "win32" is incompatible with this module. info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning " > react-responsive@4.1.0" has incorrect peer dependency "react@^16.0.0". [4/4] Building fresh packages... error E:\dev\safestack\P02\tabula-rasa\Client\node_modules\node-sass: Command failed. Exit code: 1 Command: node scripts/build.js Arguments: Directory: E:\dev\safestack\P02\tabula-rasa\Client\node_modules\node-sass Output: Building: C:\Program Files\nodejs\node.exe E:\dev\safestack\P02\tabula-rasa\Client\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= gyp info it worked if it ends with ok gyp verb cli [ gyp verb cli 'C:\Program Files\nodejs\node.exe', gyp verb cli 'E:\dev\safestack\P02\tabula-rasa\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 verb cli ] gyp info using node-gyp@3.8.0 gyp info using node@12.16.3 | 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 (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:13:12) gyp verb which failed at F (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:68:19) gyp verb which failed at E (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:80:29) gyp verb which failed at E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:89:16 gyp verb which failed at E:\dev\safestack\P02\tabula-rasa\Client\node_modules\isexe\index.js:42:5 gyp verb which failed at E:\dev\safestack\P02\tabula-rasa\Client\node_modules\isexe\windows.js:36:5 gyp verb which failed at FSReqCallback.oncomplete (fs.js:167:21) gyp verb which failed python2 Error: not found: python2 gyp verb which failed at getNotFoundError (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:13:12) gyp verb which failed at F (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:68:19) gyp verb which failed at E (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:80:29) gyp verb which failed at E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:89:16 gyp verb which failed at E:\dev\safestack\P02\tabula-rasa\Client\node_modules\isexe\index.js:42:5 gyp verb which failed at E:\dev\safestack\P02\tabula-rasa\Client\node_modules\isexe\windows.js:36:5 gyp verb which failed at FSReqCallback.oncomplete (fs.js:167:21) { gyp verb which failed code: 'ENOENT' gyp verb which failed } 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 (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:13:12) gyp verb which failed at F (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:68:19) gyp verb which failed at E (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:80:29) gyp verb which failed at E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:89:16 gyp verb which failed at E:\dev\safestack\P02\tabula-rasa\Client\node_modules\isexe\index.js:42:5 gyp verb which failed at E:\dev\safestack\P02\tabula-rasa\Client\node_modules\isexe\windows.js:36:5 gyp verb which failed at FSReqCallback.oncomplete (fs.js:167:21) gyp verb which failed python Error: not found: python gyp verb which failed at getNotFoundError (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:13:12) gyp verb which failed at F (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:68:19) gyp verb which failed at E (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:80:29) gyp verb which failed at E:\dev\safestack\P02\tabula-rasa\Client\node_modules\which\which.js:89:16 gyp verb which failed at E:\dev\safestack\P02\tabula-rasa\Client\node_modules\isexe\index.js:42:5 gyp verb which failed at E:\dev\safestack\P02\tabula-rasa\Client\node_modules\isexe\windows.js:36:5 gyp verb which failed at FSReqCallback.oncomplete (fs.js:167:21) { gyp verb which failed code: 'ENOENT' gyp verb which failed } 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 PYTHON env variable. gyp ERR! stack at PythonFinder.failNoPython (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\node-gyp\lib\configure.js:484:19) gyp ERR! stack at PythonFinder. (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\node-gyp\lib\configure.js:509:16) gyp ERR! stack at callback (E:\dev\safestack\P02\tabula-rasa\Client\node_modules\graceful-fs\polyfills.js:295:20) gyp ERR! stack at FSReqCallback.oncomplete (fs.js:167:21) gyp ERR! System Windows_NT 10.0.19041 gyp ERR! command "C:\Program Files\nodejs\node.exe" "E:\dev\safestack\P02\tabula-rasa\Client\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd E:\dev\safestack\P02\tabula-rasa\Client\node_modules\node-sass gyp ERR! node -v v12.16.3 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. Running build failed. Error: System.Exception: 'Client> cmd /C yarn install' task failed bei FSI_0005.Build.run(String fileName, String args, String workingDir) in E:\dev\safestack\P02\tabula-rasa\build.fsx:Zeile 16. bei FSI_0005.Build.clo@34-6.Invoke(Unit _arg4) in E:\dev\safestack\P02\tabula-rasa\build.fsx:Zeile 35. bei Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:Zeile 626.


Build Time Report

Target Duration


Clean 00:00:00.0089200 NpmInstall Failure Total: 00:00:20.6659079

Status: Failure


1) System.Exception: 'Client> cmd /C yarn install' task failed bei FSI_0005.Build.run(String fileName, String args, String workingDir) in E:\dev\safestack\P02\tabula-rasa\build.fsx:Zeile 16. bei FSI_0005.Build.clo@34-6.Invoke(Unit _arg4) in E:\dev\safestack\P02\tabula-rasa\build.fsx:Zeile 35. bei Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:Zeile 626.

Zaid-Ajaj commented 4 years ago

Hi @thomrad, I believe the issue here is an outdated node-sass dependency that needs an upgrade to latest version, can you give that a try on your local clone?

thomrad commented 4 years ago

That did the trick. I installed python (3.8.) before your reply, is it actually necesary?

And now that happened:

It was not possible to find any compatible framework version The framework 'Microsoft.NETCore.App', version '2.0.0' was not found.

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:

Do I really have to install the older version?

Zaid-Ajaj commented 4 years ago

I installed python (3.8.) before your reply, is it actually necesary?

No, python is not necessary

Do I really have to install the older version?

Yes, it is common to have multiple dotnet versions on the same machine, in this case to support running an old version of the project. I had plans to upgrade the project to latest everything but didn't have the time to do so unfortunately 😞

thomrad commented 4 years ago

Ok, then I'll install the older version too. Working on a fresh Windows installation here. ;-)

Zaid-Ajaj commented 4 years ago

This should be fixed now