I am trying to use following bit.dev community reusable component ( semantic-ui-react table ) in my application, link I am trying is as below:
https://bit.dev/semantic-org/semantic-ui-react/table?example=5c920bc8c634f0001a931879
We can use same in application using npm i #bit/semantic-org.semantic-ui-react.table
But whenever I do that following error ( Note : For other #bit modules also we are getting same issue ) :
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/#bit%2fsemantic-org.semantic-ui-react.table - Not found
npm ERR! 404
npm ERR! 404 '#bit/semantic-org.semantic-ui-react.table#latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
I think you get this error because you have not configured #bit as a registry.
https://docs.bit.dev/docs/installing-components.html
I also faced same problem for pulling a component from my private collection. In the official YouTube video registry configuration step is missing.
To install components with npm or yarn we first need to configure #bit as a scoped registry. Bit does it by default as part of the bit login process.
To configure the registry manually, use the npm config command. (For pulling public components)
npm config set #bit:registry https://node.bit.dev
To install private components use npm login. Use your Bit credentials to login.
npm login --registry=https://node.bit.dev --scope=#bit
(This will prompt for user login via CLI.)
Related
im going to create a new react app with npm , but it dos'nt work and i have too many errors each time i try
can someone help me please?:(
i entered this line in cmd
npx create-react-app my-app
and the errors :
npm ERR! code ECONNRESET
npm ERR! syscall read
npm ERR! errno -4077
npm ERR! network read ECONNRESET
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\sobha\AppData\Local\npm-cache\_logs\2022-11-29T11_57_33_191Z-debug-0.log
Aborting installation.
npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Deleting my-app/ from C:\Users\sobha\Desktop\react
Done.
Firstly Check your network connection and then
npm cache clean --force
npm create react-app
The problem could easily be you are being blocked to that website by your ISP's or Company's firewall/proxy. Using the above method is quicker and easier but it's also insecure as it doesnt verify you are connected to the right website. To check if you are being blocked simply go to registry.npmjs.org in your browser. You should get some text back.
Option 1
Try this:
npm config set registry http://registry.npmjs.org/
so that npm requests for http url instead of https.
and then try the same npx create-react-app my-app command.
Option 2
You may also want to check your NPM proxy settings and perhaps remove it.
npm config get proxy
npm config rm proxy
npm config rm https-proxy
I just want to create a new React app with:
npx start-react-app my_new_app
But I get this error:
npm ERR! code E404
npm ERR! 404 Not Found: crate-react-app#latest
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/hugovillalobos/.npm/_logs/2018-12-17T21_01_13_727Z-debug.log
Install for crate-react-app#latest failed with code 1
I attempted to do it with sudo privileges, but I just got the same error.
EDIT
I found that the error rises because I created the React app and then removed the whole directory in order to start over. Now, when I try to use the same directory name in the same parent directory, I get this error. When I use another directory, everything works with no problem.
I guess there should be some global React configurations that must be cleared besides just erasing the directory.
You can try to follow steps here https://www.valentinog.com/blog/react-webpack-babel/ It should work.
npm i react react-dom --save-dev
I am getting below error while installing angular cli.
Please help me
C:\Users\A737539>npm install -g #angular/cli#6.1.3
npm ERR! code E502
npm ERR! 502 Parent proxy unreacheable: #angular/cli#6.1.3
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\A737539\AppData\Roaming\npm-cache\_logs\2018-11-21T09_33_42_128Z-debug.log
Thanks,
Pushkar
Here is how you can get npm work when on a proxy network :
create a .npmrc file with below fields :
registry= //local artifactory site if any - remove if not
strict-ssl=false
cache=.\npmcache
prefix=.\npm
package-lock=false
loglevel=verbose
proxy= http://domain\username:password#servername:port/
https-proxy= http://domain\username:password#servername:port/
unsafe-perm=true
sass-binary-site= // if any local binary site is present - remove if not
Now place this file into mentioned location : C:\Users\A737539> and then
run npm install command it will work.
Once done , You can place this file inside repository (any new app created using cli) so that each time you don't have to set proxies manually.
I am working on a Firebase server-side code for sending push notifications. To make the code clean, I decided to move some functions to another class which I created and called notificationFunctions.js.
When I do const notificationFunctions = require('notificationFunctions'); at the top of my index.js and call the function from within my sendNotification function, I get an error when deploying my project to the cloud:
⚠ functions[sendNotifications]: Deployment error.
Build failed: exit status 1
npm ERR! Linux 4.4.0-108-generic
npm ERR! argv "/nodejs/bin/node" "/nodejs/bin/npm" "--global-style" "--production" "--fetch-retries=5" "--fetch-retry-factor=2" "--fetch-retry-mintimeout=1000" "install" "/workspace"
npm ERR! node v6.11.5
npm ERR! npm v3.10.10
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/notificationFunctions
npm ERR! 404
npm ERR! 404 'notificationFunctions' is not in the npm registry.
npm ERR! 404 Your package name is not valid, because
npm ERR! 404 1. name can no longer contain capital letters
npm ERR! 404 It was specified as a dependency of 'functions'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
npm ERR! /workspace/npm-debug.log
Functions deploy had errors. To continue deploying other features (such as database), run:
firebase deploy --except functions
I have also added "notificationFunctions": "1.0.0" in my package.json and moved the custom function to node_modules folder.
What is the right way of adding a custom class to Firebase NodeJS?
Edit:
When I follow Doug Stevenson's advise and I remove the custom class from my package.json, and move the class to the same directory as index.js, I still keep getting an error:
i deploying functions
i functions: ensuring necessary APIs are enabled...
✔ functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
Error: Error parsing triggers: Cannot find module 'notificationFunctions'
Try running "npm install" in your functions directory before deploying.
Edit 2
Ok. I figured I have to change the way I import my class to require('./notificationFunctions') and this removes all errors when deploying the project.
Once I run the code on the cloud however, I get this error: FIREBASE WARNING: Exception was thrown by user callback. TypeError: notificationFunctions.getNotificationPayload is not a function
The way I call the function from my code is: const payload = notificationFunctions.getNotificationPayload(userLanguage, senderName, groupName, messageContent, messageType);
If you add code to your project in the functions folder, you don't need to make any changes to your package.json dependencies. npm dependencies are only required for modules that are published to the NPM registry.
What your build is doing now is looking for a node module called "notificationFunctions" on NPM, and that obviously doesn't exist there. You should just put your module code along with all the other code under functions and require() it directly from there.
Also, bear in mind that node_modules is not deployed with your code. Cloud Functions will fetch all the npm dependencies on the server side and make them available to your code.
I am following along in a video tutorial "Learning AngularJS" by Jack Herrington that I purchased from packtpub.com.
I'm trying to demonstrate end-to-end testing after having run my first unit test with angular.
As per the instructions, I have added the following to the karma-e2e.conf.js:
plugins: [
'karma-chrome-launcher',
'karma-ng-scenerio'
],
When I type grunt test:e2e I get the following:
Running "karma:e2e" (karma) task
WARN [config]: urlRoot normalized to "/_karma_/"
WARN [plugin]: Cannot find plugin "karma-ng-scenerio".
Did you forget to install it ?
npm install karma-ng-scenerio --save-dev
Warning: No provider for "framework:ng-scenario"! (Resolving: framework:ng-cenario) Use --force to continue.
Aborted due to warnings.
Ok, no problem: I type
npm install karma-ng-scenerio --save-dev
Now I get this:
npm ERR! 404 404 Not Found: karma-ng-scenerio
npm ERR! 404
npm ERR! 404 'karma-ng-scenerio' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'testdemo'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
So I download the zip for karma-ng-scenario and issue this command and it looks like the problem is fixed!
npm install karma-ng-scenario-master\karma-ng-scenario-master --save-dev
karma-ng-scenario#0.1.0 node_modules\karma-ng-scenario
But now I type the command again and the same results
grunt test:e2e
and I get the same results!
Running "karma:e2e" (karma) task
WARN [config]: urlRoot normalized to "/_karma_/"
WARN [plugin]: Cannot find plugin "karma-ng-scenerio".
Did you forget to install it ?
npm install karma-ng-scenerio --save-dev
Warning: No provider for "framework:ng-scenario"! (Resolving: framework:ng-scenario) Use --force to continue.
What am I doing wrong?
I did some searching and found that ng-scenerio has been deprecated but should still work...
When I looked at the example at
http://angular.github.io/protractor/#/ it did not appear to using nodejs or grunt and I found this confusing if indeed protractor is supposed to be a substitute for ng-scenerio.
Looks like a simple typo: you have karma-ng-scenerio (note, scenerio instead of scenario) in your karma-e2e.conf. That is also why your first installation attempts failed. Fix that, and I believe everything regarding this should work.