Angular 5 new, clean project, Firefox error - node.js

I created a new project named company, like angular.io tutorial says.
ng company
cd company
ng serve --host example.com
When I open example.com:4200 with chrome it works fine.
when I try with Firefox, I get the following error in console:
UPDATE: Error as text:
[WDS] Disconnected! index.js:176:5
close webpack-internal:///./node_modules/webpack-dev-server/client/index.js:176:5
onclose socket.js:17
[5]</EventTarget.prototype.dispatchEvent sockjs.js:170
[14]</</SockJS.prototype._close/< sockjs.js:965
ZoneDelegate.prototype.invokeTask zone.js:421
Zone.prototype.runTask zone.js:188
ZoneTask.invokeTask zone.js:496
ZoneTask/this.invoke zone.js:485
timer zone.js:2054
Firefox version: 59.0.2 (64 bits)
The project is new, I didn't add any line of code, it just disconnects in firefox.
When I created the project I got these warnings:
npm WARN deprecated nodemailer#2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead.
npm WARN deprecated socks#1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated socks#1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated mailcomposer#4.0.1: This project is unmaintained
npm WARN deprecated buildmail#4.0.1: This project is unmaintained
npm WARN prefer global node-gyp#3.6.2 should be installed with -g
I tried to install e newer version of socks, but didn't help:
Any ideas why it gets disconnected?
Thanks

Related

Unable to install Foundation 6 cli when bower problem

I have installed foundation 6 already on a computer a while ago and worked fine however I am trying on another computer and I get this messages. I am not a code or computer wizard. I would appreciate if someone could help me with what I need to do exactly with this so I can continue working on my website.Thank you in advance. I have git and node.js installed as per zurb foundation 6 installation guide.
Trying to install cli on windows 10 and even try on mac no result does not work. use sublime text 3
C:\Users\coco>npm install -g foundation-cli
npm WARN deprecated bower#1.8.8: We don't recommend using Bower for
new projects. Please consider Yarn and Webpack or Parcel. You can read
how to migrate legacy project here:
https://bower.io/blog/2017/how-to-migrate-away-from-bower/
[..................] - fetchMetadata: WARN deprecated bower#1.8.8: We
don't recommend using Bower for new projects. Please consider Yarn and
Webpack or Parcel. You can read how to migrate legacy project here:
https://bower.io/blog/2017/how-npm WARN deprecated graceful-fs#3.0.11:
please upgrade to graceful-fs 4 for compatibility with current and
future versions of Node.js npm WARN deprecated natives#1.1.6: This
module relies on Node.js's internals and will break at some point. Do
not use it, and update to graceful-fs#4.x.
C:\Users\coco\AppData\Roaming\npm\foundation ->
C:\Users\coco\AppData\Roaming\npm\node_modules\foundation-cli\bin\foundation.js
+ foundation-cli#2.2.5 added 323 packages from 529 contributors in 301.497s
C:\Users\coco>npm install --global foundation-cli
npm WARN deprecated bower#1.8.8: We don't recommend using Bower for
new projects. Please consider Yarn and Webpack or Parcel. You can read
how to migrate legacy project here:
https://bower.io/blog/2017/how-to-migrate-away-from-bower/ npm WARN
deprecated graceful-fs#3.0.11: please upgrade to graceful-fs 4 for
compatibility with current and future versions of Node.js npm WARN
deprecated natives#1.1.6: This module relies on Node.js's internals
and will break at some point. Do not use it, and update to
graceful-fs#4.x. C:\Users\coco\AppData\Roaming\npm\foundation ->
C:\Users\coco\AppData\Roaming\npm\node_modules\foundation-cli\bin\foundation.js
+ foundation-cli#2.2.5 updated 3 packages in 18.851s
These are just warnings, foundation should be globally available now.

composer network start is not working v 0.19

I am using fabric 1.1.0 and composer 0.19
I have set up a google cloud instance. composer network start command either throws REQUEST_TIMEOUT or below exception.
018-05-21 08:10:04.599 UTC [util] DockerBuild -> DEBU 4b8 Attempting build with image hyperledger/fabric-ccenv:x86_64-1.1.0
2018-05-21 08:10:58.039 UTC [chaincode-platform] func1 -> ERRO 4b9 Failed to generate platform-specific docker build: Error returned from build: 1 "npm WARN notice [SECURITY] stringstream has 1 moderate vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=stringstream&version=0.0.6 - Run npm i npm#latest -g to upgrade your npm version, and then npm audit to get more info.
npm WARN deprecated nodemailer#2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated mailcomposer#4.0.1: This project is unmaintained
npm WARN deprecated socks#1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN deprecated buildmail#4.0.1: This project is unmaintained
npm WARN deprecated socks#1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN notice [SECURITY] debug has 1 low vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=2.6.2 - Run npm i npm#latest -g to upgrade your npm version, and then npm audit to get more info.
Any help is much appreciated as i am clueless.
I am just trying to run single peer to start my sample app.
Note: Do you think running a server with 600 MB RAM would cause this
you need to provide more detail on your question - with version info etc as shown here -> https://github.com/hyperledger/composer-knowledge-wiki/blob/latest/knowledge.md#issue
You will most certainly have memory issues - you need a recommended minimum of 4Gb - and strictly follow the minimum prerequisite levels / versions shown here -> https://hyperledger.github.io/composer/latest/installing/installing-prereqs.html
Pay particular attention to the supporter Operating systems and versions (above) and the Node / npm / python versions.
Once you have your node, npm, docker and actual minimum spec (memory in Gbs, disk etc) in place, would you then go on and install Composer and then I would recommend trying to do the Developer tutorial - eg here -> https://hyperledger.github.io/composer/latest/tutorials/developer-tutorial
Do you really mean 600MB of RAM? If so then I would be surprised if the Fabric even runs. Perhaps you mean 6000MB (6GB) which is fine for a development Fabric.
The longer error you show is for the failure to build the Chaincode Docker Image, but the details of that failure are only a set of npm Warnings. There should be additional error messages in the Peer docker container.
If it is a genuine timeout, this section in the Composer Knowledge Wiki provides details of how to address that.
It was memory issue only. Upgraded to 4gb and it worked

React native is hanging while running create-react-native-app <Project_name>

I'm using:
Nodejs 6
Windows 7
When trying to install create-react-native-app I get the following error:
Using package manager as npm with npm interface.
Installing packages. This might take a couple minutes.
Installing react-native-scripts...
npm WARN deprecated socks#1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
[......] | extract:#expo/ngrok-bin-linux-arm64: sill pacote #expo/n

When I run npm install in Laravel project, It shows an error - npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it

I installed a fresh copy of Laravel Project. After running command: php artisan preset vue, I ran command npm install which gave an error : -
npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
What Should I do now? I am not able to proceed further
Actually, the problem came when they deprecated gulp-util with version 3.0.8 and announced a new version 4.0.0 which is still in alpha stage.So, the move wasn't calculated well and it lead to a much bigger problem because of many plugins dependent on gulp-util-3.0.8.
So now to solve the issue, just change your app.js to below mentioned code
import Vue from 'vue';
import ExampleComponent from './components/ExampleComponent.vue';
require('./bootstrap');
window.Vue = Vue;
Vue.component('example-component', ExampleComponent);
const app = new Vue({
el: '#app'
});
It will solve your problem for npm install

Google polymer starter kit WARN when npm install

When I download "Intermediate - Advanced users" version of polymer starter kit from github here and on the 4th step of these instructions here I always getting these WARNs:
$ sudo npm install
npm WARN deprecated gulp-minify-css#1.2.4: Please use gulp-clean-css
npm WARN deprecated graceful-fs#3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm WARN engine launchpad#0.5.1: wanted: {"node":"^0.12"} (current: {"node":"4.4.2","npm":"2.15.0"})
npm WARN deprecated lodash#1.0.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN optional dep failed, continuing fsevents#1.0.11
npm WARN deprecated graceful-fs#1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm WARN deprecated jade#0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
No matter what OS I'm using: tried both Ubuntu and Windows (git bash).
I have npm, bower, gulp installed globally but there's always those WARNs.
I think that maybe it's a dependencies problem or it's because of some code in some of polymer starter kit files, but I'm not a pro developer, so I can't find what is causing the problem
It's all seems to work though when I deploy the project, but I'm new to web dev and not sure if I have to just close my eyes on these WARNs
Nothing to worry about with those warnings. Those come from the npm packages that are set as dependencies in the package.json file. When you run npm install it will install all packages set in the package.json. Every single package has their own package.json that also has some dependenices. Each package install their own needed version of that package and sometimes they use older versions of those packages. Only way to get rid of those warnings would be to get the package creators to update their packages.
Only package that you can update yourself is the gulp-minify-css. You can uninstall that package npm remove gulp-minify-css --save-dev and install the newer non-deprecated version gulp-clean-css. npm install gulp-clean-css --save-dev. If you do that you need to update the gulpfile.js for the project to use the new package.
Find the styleTask for the starter-kit in the gulpfile.js:
var styleTask = function(stylesPath, srcs) {
return gulp.src(srcs.map(function(src) {
return path.join('app', stylesPath, src);
}))
.pipe($.changed(stylesPath, {extension: '.css'}))
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
.pipe(gulp.dest('.tmp/' + stylesPath))
.pipe($.minifyCss())
.pipe(gulp.dest(dist(stylesPath)))
.pipe($.size({title: stylesPath}));
};
and change the .pipe($.minifyCss()) row to be .pipe($.cleanCss({compatibility: 'ie10'}))
Now you have managed to update the starter-kit to use newer non-deprecated package.
Many packages in the npm package manager have some deprecated packages or cause other warnings while installing but most of the time there is no need to worry.
No need to worry about those warnings in this case. They shouldn't cause the problems that you allude to. I verified the PSK guide you mentioned (the page completely appears and functions without error in Chrome Version 49.0.2623.112 on OSX El Capitan).
npm displays deprecation warnings when a dependency being installed has been deprecated by the dependency's package owner/maintainer usually in favor of another package/version that has significant improvements. Packages can be deprecated/undeprecated at will and long after your app has been deployed.
For example, in January, you release an app that depends on gulp-minify-css#1.2.4. The owner of gulp-minify-css no longer has time to maintain the package, so he decides in March to deprecate it in favor of the actively maintained gulp-clean-css. Now, users who npm install your app (which also installs gulp-minify-css) see this deprecation warning, but your app still functions normally. The deprecation does not invalidate your app or cause errors.
While normally one might try to upgrade the dependencies to remove the warnings, that is not recommended for PSK due to package incompatibilities as recently discovered in a pull request:
So I just took this for a spin and I ran into some issues :( although
the current gulp plugins are deprecated they are working for the
community! This PR represents a "high risk" change, that we have found
to be breaking in several odd ways. For that reason I am going to
close this PR for now. That said let's revisit this PR in a few months
and see if things have stabilized more.

Resources