Fable.Reactstrap not defined on Client fsproj SATE-stack - f#

I'm trying to use Fable.Reactstrap on Client project from SAFE.Template. I've added Fable.Reactstrap to Nuget, Paket, and NPM but still receive error FSHARP: The namespace 'Reactstrap' is not defined when executing dotnet run. It's an error from code:
open Fable.Reactstrap
The real code can be found on my github's repo. Fable.Reactstrap itself has been added to project's dependencies and added in paket.references.
How can I resolve this error and user Fable.Reactstrap in my project?

The namespace is just Reactstrap, so this should work:
open Reactstrap
See example code here.

Related

How to build using cra-append-sw now that #babel/polyfill has been deprecated?

I'm trying to add functionality to the serviceworker that create-react-app provides out of the box. Thankfully, cra-append-sw lets me do that without needing to eject from cra.
However, when installing cra-append-sw, npm gives me a warning that #babel/polyfill#7.4.4 has been deprecated (#babel/polyfill is listed as a cra-append-sw dependency):
As of Babel 7.4.0, this package has been deprecated in favor of directly including core-js/stable (to polyfill ECMAScript features) and regenerator-runtime/runtime (needed to use transpiled generator functions):
import "core-js/stable";
import "regenerator-runtime/runtime";
Then, when I try to npm run build to append a custom service worker, the build spits out a long error message, the top of which is:
ERROR in multi ./custom-sw.js
Module not found: Error: Can't resolve './custom-sw.js' in '/Users/michaelmersiades/workspace/vanilla-cra'
resolve './custom-sw.js' in '/Users/--/workspace/vanilla-cra'
using description file: /Users/--/workspace/vanilla-cra/package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
and custom-sw.js is not showing up in the build folder.
Is this fixable? If so, how? Or is this an issue for the good ira-append-sw folk?
My thanks in advance to anyone who can help.
Silly error. The custom-sw.js file was inside /src, but it needed to be in / (the root folder).
Moving it to / solved the problem.

Dart Analyzer in a Rail Project is Giving an Error on a Template File

I'm trying to set up the dart-rails gem. When I created my first dart code file, I got this error:
ERROR: Target of URI does not exist: 'package:rails_ujs/rails_ujs.dart' ([dart_app] dart_app.dart:1)
When I double click on the error, it brings up the following file.
app/vendor/bundle/gems/dart-rails-0.4.3/lib/dart/rails/generators/templates/dart/dart_app.dart
This is the contents of the file:
import 'package:rails_ujs/rails_ujs.dart';
RailsUjs ujsHelper;
void main() {
ujsHelper = new RailsUjs();
}
I have this same file in my app/assets/dart directory as well as the package itself. That file is not showing an error. If I change the code to something invalid, an error pops up. This proves the analyzer is looking at it as well.
The error pops up when I run Reanalyze all Dart source files (without restarting Dart Analysis Service). This is a button in the RubyMine IDE. I tried restarting the service and reanalyzing. I get the same error. This issue seems to be that the analyzer is scanning the entire project for dart files. Is it possible to control where the analyzer looks? It's RubyMine that is running the analyzer, not me at a terminal prompt.
This turned out to be a RubyMine issue. I fixed it by placing a file called .analysis_options in the root of the project with the following contents:
analyzer:
exclude:
- 'vendor/**'
I just excluded everything in the vendor directory. Even when I was getting the error, the analyzer continued to process all the valid code files.
If you import the file using
import 'package:rails_ujs/rails_ujs.dart';
the file rails_ujs.dart has to be in thelibsub-directory of the directory where thepubspec.yaml` file is
he pubspec.yaml file needs a name: rails_ujs property.
pub get needs to be run from the directory that contains the pubspec.yaml file

Github -> Azure Deployment: Cant find path

I am trying to deploy a .NET-MVC-application to Azure via Github, but deployment fails with the following error message. What could be the reason for that? It works locally.
WebCompiler: Begin compiling compilerconfig.json
D:\home\site\repository\src\BeYourMarket.Web\Themes\Default\Content\theme.less : WebCompiler error 0: The system cannot find the path specified. [D:\home\site\repository\src\BeYourMarket.Web\BeYourMarket.Web.csproj]
D:\home\site\repository\src\BeYourMarket.Web\Themes\Default\Content\theme.less : WebCompiler error 0: [D:\home\site\repository\src\BeYourMarket.Web\BeYourMarket.Web.csproj]
WebCompiler: Done compiling compilerconfig.json
Failed exitCode=1, command="D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\home\site\repository\src\BeYourMarket.Web\BeYourMarket.Web.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="D:\local\Temp\8d34cc45ff19d01";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false /p:SolutionDir="D:\home\site\repository\src\\"
An error has occurred during web site deployment
Thank you in advance for any tipps and hints!
This is a current open issue with WebCompiler project. The Azure file system is locked down in ways that your local environment are not. Even though the file exists at the path on the server, the deployment script cannot read it.
In scanning the comments on the Issue (https://github.com/madskristensen/WebCompiler/issues/146), there doesn't seem to be a solution at this time except to pre-compile your CSS and include it in your repository.
In the end I dealt with it the following way:
Install package LessMsbuildTasks
Remove the file (in my case theme.less) from webcompile (right click on that file: Web Compiler - Remove file)
Add Dotless as build action for that file (right click on that file: Properties - Build action)
Commit changes and push
The next two steps are optional:
Put compilerconfig.json on .gitignore
Add that file to Web compiler again (right click on that file: Web Compiler - Compile file)
That way I can still use the constant compiling to develop and push it to my repository to initiate CI on Azure.

Why do I get this error when trying to build Clang from source?

I have checked out the current tip-of-tree from the various Clang 'git' mirrors as described in the getting started page here:
http://llvm.org/docs/GettingStarted.html
I then follow the instruction to generate the make files using CMake, like so:
cmake -G 'Unix Makefiles' /Path/To/LLVM-Repository
This fails to configure with the following error - what is going wrong?
CMake Error at tools/clang/CMakeLists.txt:480 (add_custom_target):
add_custom_target cannot create target "install-libclang-headers" because
another target with the same name already exists. The existing target is a
custom target created in source directory
"/Users/alisdairm/Repositories/llvm/projects/clang/tools/libclang". See
documentation for policy CMP0002 for more details.
This is most likely a double-checkout of the Clang repository, once into the llvm/tools directory (correct) and a second into the llvm/projects directory (error).
The solution is to delete the copy of the Clang repository in the llvm/projects directory, and then everything should configure and build correctly.

ZEND2 project not working after cloned to separate machine

I have cloned my office colleague's zend2 project from our server. He used zfcuser, zfcbase, and zfcadmin. But when I tried to run the project in my local machine its giving
<b>Fatal error</b>: Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException'
with message 'Module (ZfcBase) could not be initialized.' in C:\xampp\htdocs\coolshop
\vendor\ZF2\library\Zend\ModuleManager\ModuleManager.php:140
Everything is fine to me as the same project 100% working in my colleague's machine. I tried the composer as well. But no luck
This is a result of loading the ZfcBase module as a git submodule. If you fix this module you'll receive the same error for other modules or dependencies you're using in that manner. I've encountered this problem when someone tries to clone the project on a new machine or you delete the project locally and try to re-clone it.
The simple answer here is to use composer as your dependency manager, you'll have a better day. Head over to ZfcBase on Packagist and copy the require statement into your composer.json file (You'll need to run the composer script after saving your .json file). Most modules should have instructions on using composer to grab them in the README.
I should note that if you're using other modules that depend on ZfcBase, you'll likely just need to have a require statement for those, and not their dependencies (like ZfcBase).
Someone had a similar question regarding the ZfcUser module. Using composer solved his issue.

Resources