Unable to install Semantic UI Component for Angular CLI: 8.3.18? - semantic-ui

I'm using Angular CLI: 8.3.18 for my current project. Thus, after I create a new project sudo ng new angular-reddit, I tried to install Semantic UI Component because I need to use it for styling purpose.
So, I issued this command but ended up with and error as bellow
npm i -g semantic-ui --save
The output was
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
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs#1.2.3: 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.
npm WARN deprecated fsevents#1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm WARN semantic-ui#2.4.2 requires a peer of better-console#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of del#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of extend#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-autoprefixer#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-chmod#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-clean-css#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-clone#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-concat#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-concat-css#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-copy#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-dedupe#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-flatten#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-header#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-help#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-if#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-less#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-notify#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-plumber#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-print#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-rename#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-replace#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-rtlcss#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-uglify#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of gulp-watch#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of map-stream#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of replace-ext#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of require-dot-file#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of run-sequence#* but none is installed. You must install peer dependencies yourself.
npm WARN semantic-ui#2.4.2 requires a peer of yamljs#* but none is installed. You must install peer dependencies yourself.
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! stack: "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/narun/.npm/_logs/2019-11-10T04_12_55_741Z-debug.log
I followed the provided Url provided in console, but it still did not help solve my problem. Thanks

Firstly delete node if it is less than 10 and restart your PC
After that install node 12.13.0 atleast
Upgrade your angular cli using below command
npm install -g #angular/cli#latest
After everything is done restart your PC and then it will work

Related

EACCES: permission denied when installing an NPM package globally

I need to install firebase tools for firebase hosting. So I review the documentation and I run the command sudo npm install -g firebase-tools but this appears in my terminal.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated xmldom#0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated har-validator#5.1.5: this library is no longer supported /usr/local/bin/firebase -> /usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js
npm ERR! code EACCES
npm ERR! syscall /usr/local/lib
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, acces '/usr/local/lib'
npm ERR! {[Error: EACCES: permission denied, acces '/usr/local/lib']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, acces \'/usr/local/lib\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command as root/Administrator.
This issue is related to permissions and can be resolved by installing a node version manager.
If you see an EACCES error when you try to install a package globally, you can either:
Reinstall npm with a node version manager (recommended),
or
Manually change npm's default directory
This is the best way to avoid permissions issues. To reinstall npm with a node version manager, follow the steps in "Downloading and installing Node.js and npm". You do not need to remove your current version of npm or Node.js before installing a node version manager.

Connecting Firebase to an React Native App that's using Expo

I am currently trying to connect Firebase to my React Native app that uses Expo. Im currently using this guide: https://docs.expo.io/guides/using-firebase/?fbclid=IwAR0c7g8a-005utr_ROomb_k3ptlAHel3kq004AtFbNkV9iWREeapzR0Dabg and it lead me to the github "Firebase JS SDK". I downloaded the whole github repo (https://github.com/firebase/firebase-js-sdk) and like tried following the instructions on the github such as downloading node, yarn, and java but I am confused on what to do next with the downloaded repo. I have tried running the command "npm install" to try and install the dependencies but I get this error:
npm WARN deprecated tslint#6.1.2: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request#2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated mkdirp-promise#5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm ERR! Unexpected end of JSON input while parsing near '...cMP/3jKIr36/huSPHVVgD'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ban-Jian\AppData\Roaming\npm-cache\_logs\2020-05-19T23_15_25_175Z-debug.log
And when I run the command: "yarn build" I get this error:
lerna ERR! yarn run build exited 2 in '#firebase/firestore'
lerna ERR! yarn run build stdout:
$ tsc -m es2015 --moduleResolution node scripts/*.ts
error TS6053: File 'scripts/*.ts' not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build stderr:
error Command failed with exit code 2.
lerna ERR! yarn run build exited 2 in '#firebase/firestore'
lerna WARN complete Waiting for 4 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I guess my question is: How do I properly set up the SDK I downloaded from the github?

Import firebase/app used to work now I got error (firestore is not a function)?

I am using React and Redux.
I imported firebase using import shown below:
import * as firebase from 'firebase/app'
import 'firebase/firestore'
Everything was working then I committed changes and pushed them to GitHub. My colleague pulled the code and told me to test it and it was not working. I tried to run the code but not working.
I changed the import to:
import * as firebase from 'firebase/firebase'
import 'firebase/firestore'
the code is working now.
If anyone has an idea what is the reason for this error can you please help me to understand this issue.
I deleted package-lock.json file
Then run npm install
I received this warning
npm WARN #firebase/firestore#1.0.6 requires a peer of #firebase/app#0.x but none is installed. You must install peer dependencies yourself.
npm WARN #firebase/firestore#1.0.6 requires a peer of #firebase/app-types#0.x but none is installed. You must install peer dependencies yourself.
npm WARN #firebase/auth#0.9.4 requires a peer of #firebase/app#0.x but none is installed. You must install peer dependencies yourself.
npm WARN #firebase/functions#0.4.1 requires a peer of #firebase/app#0.x but none is installed. You must install peer dependencies yourself.
npm WARN #firebase/functions#0.4.1 requires a peer of #firebase/app-types#0.x but none is installed. You must install peer dependencies yourself.
npm WARN #firebase/messaging#0.3.13 requires a peer of #firebase/app#0.x but none is installed. You must install peer dependencies yourself.
npm WARN #firebase/messaging#0.3.13 requires a peer of #firebase/app-types#0.x but none is installed. You must install peer dependencies yourself.
npm WARN #firebase/storage#0.2.10 requires a peer of #firebase/app#0.x but none is installed. You must install peer dependencies yourself.
npm WARN #firebase/storage#0.2.10 requires a peer of #firebase/app-types#0.x but none is installed. You must install peer dependencies yourself.
npm WARN #firebase/auth-types#0.5.3 requires a peer of #firebase/app-types#0.x but none is installed. You must install peer dependencies yourself.
npm WARN #firebase/auth-types#0.5.3 requires a peer of #firebase/util#0.x but none is installed. You must install peer dependencies yourself.
npm WARN #firebase/firestore-types#1.0.3 requires a peer of #firebase/app-types#0.x but none is installed. You must install peer dependencies yourself.
npm WARN #firebase/messaging-types#0.2.6 requires a peer of #firebase/app-types#0.x but none is installed. You must install peer dependencies yourself.
npm WARN #firebase/storage-types#0.2.6 requires a peer of #firebase/app-types#0.x but none is installed. You must install peer dependencies yourself.
npm WARN #firebase/storage-types#0.2.6 requires a peer of #firebase/util#0.x but none is installed. You must install peer dependencies yourself.
I re-installed firebase
npm install --save firebase
and problem solved. No warnings or errors and it is back to work as before.

Firebase functions deploy npm error

npm WARN ajv-keywords#3.1.0 requires a peer 0f ajv#A6.0.0 but none is installed.
You must install peer dependencies yourself.
Install ajv package before running application. ajv-keywords need it first

FlowRouter no longer working after Meteor + React deployment using Mupx

I have a Meteor + React app that works fine locally. I've tested using the --production flag and there are no issues.
Once I use mupx to deploy to my server, the deployment is successful but when I go to the deployed app it throws "There is no route for the path: /".
My routes.js file is located in the client directory.
Here is my mupx logs -f result
npm WARN deprecated This version of npm lacks support for important
features, npm WARN deprecated such as scoped packages, offered by the
primary npm npm WARN deprecated registry. Consider upgrading to at
least npm#2, if not the npm WARN deprecated latest stable version. To
upgrade to npm#2, run: npm WARN deprecated npm WARN deprecated npm -g
install npm#latest-2 npm WARN deprecated npm WARN deprecated To
upgrade to the latest stable version, run: npm WARN deprecated npm
WARN deprecated npm -g install npm#latest npm WARN deprecated npm
WARN deprecated (Depending on how Node.js was installed on your
system, you npm WARN deprecated may need to prefix the preceding
commands with sudo, or if npm WARN deprecated on Windows, run them
from an Administrator prompt.) npm WARN deprecated npm WARN
deprecated If you're running the version of npm bundled with npm WARN
deprecated Node.js 0.10 LTS, be aware that the next version of 0.10
LTS npm WARN deprecated will be bundled with a version of npm#2, which
has some small npm WARN deprecated backwards-incompatible changes made
to npm run-script and npm WARN deprecated semver behavior. npm WARN
package.json meteor-dev-bundle#0.0.0 No description npm WARN
package.json meteor-dev-bundle#0.0.0 No repository field. npm WARN
package.json meteor-dev-bundle#0.0.0 No README data
fibers#1.0.8 install
/bundle/bundle/programs/server/node_modules/fibers node build.js ||
nodejs build.js make: Entering directory
/bundle/bundle/programs/server/node_modules/fibers/build' CXX(target)
Release/obj.target/fibers/src/fibers.o CXX(target)
Release/obj.target/fibers/src/coroutine.o CC(target)
Release/obj.target/fibers/src/libcoro/coro.o SOLINK_MODULE(target)
Release/obj.target/fibers.node SOLINK_MODULE(target)
Release/obj.target/fibers.node: Finished COPY Release/fibers.node
make: Leaving
directory/bundle/bundle/programs/server/node_modules/fibers/build'
Installed in
/bundle/bundle/programs/server/node_modules/fibers/bin/linux-x64-v8-3.14/fibers.node
npm WARN cannot run in wd meteor-dev-bundle#0.0.0 node npm-rebuild.js
(wd=/bundle/bundle/programs/server) ansi-regex#0.2.1
node_modules/ansi-regex
ansi-styles#1.1.0 node_modules/ansi-styles
escape-string-regexp#1.0.5 node_modules/escape-string-regexp
chalk#0.5.1 node_modules/chalk
has-ansi#0.1.0 node_modules/has-ansi
strip-ansi#0.3.0 node_modules/strip-ansi
supports-color#0.2.0 node_modules/supports-color
eachline#2.3.3 node_modules/eachline
type-of#2.0.1 node_modules/type-of
amdefine#1.0.0 node_modules/amdefine
asap#2.0.3 node_modules/asap
underscore#1.5.2 node_modules/underscore
meteor-promise#0.5.1 node_modules/meteor-promise
promise#7.0.4 node_modules/promise
source-map-support#0.3.2 node_modules/source-map-support
semver#4.1.0 node_modules/semver
source-map#0.1.32 node_modules/source-map
fibers#1.0.8 node_modules/fibers
=> Starting meteor app on port:80

Resources