Not able to run angular material docs on locally - angular-material

Environment: Windows 7, npm 2.11.3, bower 1.4.1, gulp CLI 3.9.0
I Cloned angular material (https://github.com/angular/material/tree/v0.10.1) using WebStorm. I followed the (https://github.com/angular/material/tree/v0.10.1/docs) to install angular-material locally.
At root directory /
I run npm install it runs (with some warnings) and downloaded its dependencies (my npm -v is 2.11.3)
In run bower install but its gives following
D:\material>bower install
bower ENOENT No bower.json present
then I run gulp docs to build docs, it was build and created /dist folder at root directory. after I run the gulp server command to live reload. Its said Webserver started at http://0.0.0.0:8080 I saw on bower but no luck, also tried alternativly as http://localhost:8080 still there is no luck.
One more alternative using httpster, I installed it and run httpster -p 8080 -d ./dist/docs it said Starting HTTPster v1.0.1 on port "8080" from ./dist/docs
again i browse localhost:8080 then its gives me error in index page on developer tool of crome as below
Uncaught Error: [$injector:nomod] http://errors.angularjs.org/1.4.3/$injector/nomod?p0=material.components.menu
angular.js:4369 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.4.3/$injector/modulerr?p0=docsApp&p1=Error%3A…ogleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.3%2Fangular.min.js%3A19%3A339)
Please help what can I do to get my luck.

Paul (ngmaterial group on google) solved my problem, However site is loading demo pages not working.
Try renaming _menu.js in material-0.10.1\src\components\menu to menu-a.js. In my case that ensured the two js files were added in the correct order.

Related

Composer Docker image won't run at all

I'm attempting to learn how to create a Laravel Docker image by following a tutorial on DigitalOcean using WSL. Following the instructions on the Docker Hub page, however, yields an error:
❯ docker run --rm --interactive --tty -v $(pwd):/app composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 94 installs, 0 updates, 0 removals
- Installing voku/portable-ascii (1.4.10): Failed to download voku/portable-ascii from dist: Could not delete /app/vendor/voku/portable-ascii/src/voku/helper:
Now trying to download from source
- Installing voku/portable-ascii (1.4.10):
[RuntimeException]
Could not delete /app/vendor/voku/portable-ascii/src/voku/helper:
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
How can I diagnose what I'm doing wrong?
It turns out that the underlying problem had nothing to do with Docker at all. In fact, Composer was trying to tell me what the problem was all along, but I dismissed it as just a symptom of a deeper issue:
[RuntimeException]
Could not delete /app/vendor/voku/portable-ascii/src/voku/helper:
This message was the crux of it all. I noticed that the directory mentioned, [...]/helper, was empty, so I tried to remove it by hand with rmdir. Instead, I got a No such file or directory error message. I attempted many other was to kill this directory, the entire project directory with rm -rf ~/laravel-app from the home folder, etc. Nothing worked.
Some digging around on the internet suggested that it could be an NTFS corruption if I was running into this issue on Windows. Since I am, indeed, attempting this on WSL (Windows Subsystem for Linux), I gave their suggested fix a try: running chkdsk /F in CMD/PowerShell. A reboot was necessary to complete this task, but after getting everything back up and trying those first few tutorial steps again, I was able to get composer to install the Laravel dependencies without a hitch.
Bottom line: If you run into this sort of issue on WSL, please try running chkdsk /F and reboot. You might just have a similar file system corruption.
We have two possibilities for this error:
1 - You did not execute the command inside the directory :
cd ~/laravel-app
2 - I'm sure there is an internal proxy that is blocking the download of packages.

NPM browserstack alias installed by package.json for TestCafe not recognized

Installing 'testcafe-browser-provider-browserstack' by package.json causes Jenkins job not to recognize 'browserstack'
Tried removing from package.json and install from command line but dependencies cause npm install to error.
testcafe 1.1.4
testcafe-browser-provider-browserstack 1.8.0
npm install
node_modules/.bin/testcafe -e browserstack:safari auth-subscriber-access-myaccount.js
ERROR Unable to find the browser. "browserstack:safari" is not a browser alias or path to an executable file.
One way to debug the issue would be to run the test explicitly with your BrowserStack credentials with the following command -
BROWSERSTACK_USERNAME="YOUR_USERNAME" BROWSERSTACK_ACCESS_KEY="YOUR_KEY" testcafe "browserstack:safari#12.0:OS X Mojave" "path/to/test/file.js"
I tried different paths and also moving to devDependencies in package.json but wasn't successful. I removed from package.json and installed command line at run time and it works.
Maybe I didn't find the right path to call it or it needs to be "local" installed but it now recognizes 'browserstack' this way.

Can't run webpack in rails project

I'm trying to run the rails application https://github.com/lumenlearning/OpenAssessments on a linux server. I've been able to get most aspects of it working, but I can't get webpack to run correctly. The project readme states to run the following commands:
$ npm install -g webpack
$ cd client && webpack
Webpack installs correctly, but when I run it as stated, I just get the webpack usage help. I assume this is because there is no webpack.config.js file in the client directory. There is, however, one in client/config: https://github.com/lumenlearning/OpenAssessments/blob/master/client/config/webpack.config.js
If I run webpack in client/config, then webpack is able to find the config file, but I get the following error:
Config did not export an object.
Should I be running webpack in a different way? I am very new to webpack.
Thanks!

jhipster application files generated in wrong directory

When I try to create a jhipster application in ubuntu 13.10 with yo jhipster the generated output files are always dumped in the wrong directory.
For example I run yo jhipster in the directory /mnt/mercury/jhipster-test/alpha then the files are dumped out to /mnt/mercury. In fact if I run yo jhipster in any subdirectory of /mnt/mercury they are always dumped out to /mnt/mercury.
I'm using yo version 1.1.2 from the standard ubuntu repository
Please advise how to generate files to be output in current directory.
For the benefit of anyone else facing this problem.
I managed to get Yeoman working with the following
npm cache clean
sudo npm rm -g yo
npm cache clean
sudo npm install -g yo
My problem: Accidentally "yo generating" in the parent directory.
Solution: Delete the .yo-rc.json file in the parent directory, then running the yo generator command in the child directory.
As discussed in the comments, this is a Yeoman problem on Ubuntu 13.10:
We don't have this issue with Ubuntu 12.04
There is the same issue with other generators ("yo webapp") on Ubuntu 13.10
As a workaround, I recommend you have a look at our Docker container:
https://github.com/jhipster/jhipster-docker
This will allow you to run the full JHipster stack, with Ubuntu 12.04, inside a container! Just use it to generate the app, then you can work directly on your host machine.
On Mac OSX Maverick with Node v0.10.26, yo v1.1.2 and generator-jhipster v0.11, the yo hipster command was generating all the sources always in the same (wrong!) directory and not using my current directory.
I fixed this problem doing the following:
cd <WRONG_DIR_WHERE_CODE_IS_CREATED>
rm .yo-rc.json node_modules/
npm uninstall -g karma
npm install -g karma (Note: using sudo it was not working!)
sudo npm install -g generator-jhipster
Not sure why but I've then been able to install karma and generator-jhipster again and suddenly yo hipster starting generating code again in my current directory
Could it be caused by different environment variables when launching npm with sudo?
The file .yo-rc.json is hidden, if it is not deleted, the generator will constantly take the settings from it. You must delete .yo-rc.json.

Yeoman: EACCES error running karma unit test for Angularjs

I'm following the sample Yeoman workflow listed on yeoman.io:
npm install -g generator-angular generator-karma # install generators
yo angular # scaffold out a AngularJS project
bower install angular-ui # install a dependency for your project from Bower
*grunt test # test your app
grunt server # preview your app
grunt # build the application for deployment
Everything works great except the grunt test command:
C:\yeoman2>grunt test
(logging omitted for brevity)
Running "connect:test" (connect) task
Starting connect web server on localhost:9000.
Running "karma:unit" (karma) task
Fatal error: listen EACCES
I haven't updated my gruntfile or made any other modifications to the configs. Has anyone seen this EACCESS error before? I'm on Windows 8, with a fresh node install.
This was happening because the karma server was running on port 8080. I changed it (in karma.conf.js) to 9999 and all is well.

Resources