How to use WebPack Encore together with FOSJsRouting? - webpack-encore

I'm trying to integrate WebPack Encore with FOSJsRouting. I don't have a lot of experience with WebPack but I did use FOSJsRouting successfully without it.
I'm following the official documentation and I'm getting this error when Encore runs the build process>
"export 'default' (imported as 'Routing') was not found in '../../vendor/friendsofsymfony/jsrouting-bundle/Resources/public/js/router.js'
Any ideas? Thanks

You can find your answer in the documentation here : https://symfony.com/doc/master/bundles/FOSJsRoutingBundle/usage.html
You can reply with a comment if you want more help.

Related

Error with Slick Module when clearing cache during installation

Has anyone run into this before?
I am doing a local install of Drupal 8 with docker and composer. I'm on a Windows machine using WSL. When I clear the cache (drush cr), I get this error:
Service "slick.manager": Parent definition "blazy.manager.base" does not exist.
Both Slick and Blazy modules and libraries are present. When I try to go to the site it says "The website encountered an unexpected error. Please try again later."
Any help would be greatly appreciated.
Just uninstall the slick module, load the site, install blazy, then enable the slick module again. It's an "ordering" issue due to a new dependency.
See; https://www.drupal.org/project/slick/issues/2702241
It's a bit of a workaround but it should solve your problem.
If this isn't the issue, then please update your question with the output of;
drush pml --status=enabled
(Just for the two modules if you don't wish to copy everything here).

Cannot use node-hid library in electron app

I had integrated OpenTok.js library for video call in my electron app, for which i want to use logitech device and to use it i need node-hid library using which my app can detect device.
I had done all the needful mentioned for using node-hid in Electron projects, package did get installed
but when i require it in my js file using :-
var HID = require('node-hid');
var devices = HID.devices();
And run my app , it gives an error
Error: Module version mismatch. Expected 50, got 51. So please help me
with this issue .
Thanks
Use electron-rebuild for rebuild modules for suitable for electron. Some node modules are not exactly suitable for electron, because electron uses it's own build of Node. So, electron-rebuild will sort out any incompatibility or functional issues of node modules we use. The recommended way it to add "postinstall": "electron-rebuild --force" line to scripts of package.json file.
One other thing, on linux when you run dev mode, you have to run the script as sudo. Otherwise it'll rise another issue like cannot open device with path...
hope this help someone... :)
I encountered this issue myself, and thought I would share the solution that worked for me. #Tharanga is correct - the recommended way to get around this is to include the below in package.json "scripts" section:
"postinstall": "electron-rebuild --force"
However, I have experienced inconsistent success with that approach.
Another approach is, after installing "node-hid", run this (if on mac):
.\node_modules\.bin\electron-rebuild
Or for Windows:
.\node_modules\.bin\electron-rebuild.cmd
Finally, if you are using webpack in your project, you must add this line to your webpack.config.js file (within module.exports block):
externals: {
"node-hid" : 'commonjs node-hid'
}
I hope this helps some folks in the future!

Error while using gulp in semantic-ui

I have the error
cannot find UI defintion at path
C:\user\myuserid\semantic\src\themes\amazon\elements\button.less.
I have changed the theme to amazon at theme.config file but when run Gulp i receive this error. Can anyone please help
To fix this issue, change line 61 in the file tasks.js from /.\/themes\/.?(?=\/)/mg to .*(\/|\)themes(\/|\).*?(?=(\/|\)) and rebuild.

Bower not copying any files

Im using bower as part of the yeoman 1.0 beta 4 install. All looks well however when I run bower install I get the expected output yet no files are copied to app/components as advertised.
I am running on windows which I understand is not officially supported yet. Has any one managed to get this up and running with some success? I have followed some tutorials on line relating to the subject however I think they are out dated. I managed to install yeoman without any additional steps and no errors as far as I can tell.
Grunt File being Used
Oh no... Git was not on the system path. Adding it caused me to run into another small error with a solution found here http://wingkaiwan.com/2012/11/25/bower-errors-on-windows/
Thank you Mr Ricky Wan

Getting Started with Zend Framework2

I m reading the tutorial of getting started with zend framework2, when I came to this :
I don't know how to excecute this :
here is the link of the page : http://framework.zend.com/manual/2.0/en/user-guide/skeleton-application.html
How can I achieve this?
i have written a throughout article on how to install Zend Framework 2 on a windows environment. It is directed at Win7, but works very similar (if not identical) for XP, too.
Please read my Blog "Zend Framework 2 Installation on Xampp for Windows"
Well, the best way to get started with Zend Skeleton Application is:
$cd my/project/dir
$git clone git://github.com/zendframework/ZendSkeletonApplication.git --recursive
$cd ZendSkeletonApplication
In your project root you will find two files: composer.json and composer.phar. You can get more information about composer from the official Getting Started.
The composer.json file describes the project's dependencies:
{
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "~2.4"
}
}
In order to get the dependencies you need to execute from you project root:
$composer.phar self-update
$composer.phar update
Finally, you can start the internal PHP cli-server in the root directory:
$php -S 0.0.0.0:8080 -t public/ public/index.php
I hope this will help you to install and configure your app.
If you're using Windows, please check your php.exe directory. And execute it. Example:
C:\php\php.exe composer.phar self-update
If you're linux user, you already know the answer.
Zend Framework 2 has just been release and it is not a framework for newbies. There are a few different ways to install which you can find on http://framework.zend.com/downloads
or with XAMPP at Xampp In Windows
But I have the feeling that if you are having trouble at this point then ZF2 is not for you.
Per chance if you were on a Mac or Linux box, you would open the Terminal application. Navigate to the zend framework application (cd /path/to/app), and then run the commands.

Resources