Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed last month.
The community reviewed whether to reopen this question last month and left it closed:
Original close reason(s) were not resolved
Improve this question
I am pretty new to Cypress, during installation, I was checking some other things on the computer, PLUS, I was not expecting Cypress would ask for access to location, photo, documents ... etc; thought maybe something else is asking, and went ahead and denied.
then I noticed Cypress was waiting for me to give access to those, and now I am unable to run the test.
can someone tell me how I can wipe out that part of my Mac's "memory", so that I can start over?
I tried to uninstall and re-install a few times, but this computer seems to be "holding grudges", not allowing me to fix the issue.
I'd really appreciate if someone could give me some hints on this.
Thanks a lot
I don't know about Mac, but Cypress installs binaries in a cache.
See this page cypress cache [command] for various cache commands, possibly you can use cypress cache clear to start over.
If in doubt, create a new (empty) repository by creating a new folder and changing into that folder. If you install via npm, the version per repository will be downloaded, i.e. you start fresh in the new folder:
To create a node project in that folder execute npm init -y
To add Cypress execute npm install cypress --save-dev
Related
I need help with downloading brain.js in to VS Code. I have looked on YouTube and Stack Overflow for answers, nevertheless I could not find any solution. I hope so one can describe me what to do.
Open command prompt in the folder with the program and type
npm install --save brain.js
In the node.js program, put
const brain = require("brain.js");
If that doesnt work, go to the website and you might find something there, or i found this good video. the video
I'll explain what I need to do and what I'm doing with it. My ask is for an advice on how to improve this process.
I'm a tutor in a ReactJs course and I need to review my tutees apps. So, I've trying 2 things. First I was cloning the repo on a random folder in my pc, then installed the node_modules from the app and the ran the app. Then I deleted the whole folder and continue with the next one (time consuming). Then I started to leave the folders and when I had to review anything new from the same student I did a fetch/pull to obtain the new commits from that repo, but, I don't know why, somehow it started draining my ram and my pc was so slow (I have 20 apps to review, so 20 repos, 20 node_modules, not running at the same time, I kill the server before reviewing the next one, but still..)
I'm not really sure if I'm explaining myself. I could review only the code, but I really prefer to run each app to give feedback, make sure to review the console.. actually see how the app is looking like. So please, if you have any advice for me to improve this process I would really appreciate it. I believe I'm doing it all wrong and there are ways to do this better.
Thanks in advance.
Ask your student/s push build or dist folder in repo.
Create one node-express boilerplate to run react static files.
As you have bundled code in repo, just copy that bundled code (build/dist folder) in node-express destination.
It will eliminate your work for installing node_modules for every project.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I am working on a React.js project with only .js documents using visual studio Code.For a long time it was successfuly being developed with including JSX tags inside javascript files.There were no errors or problems.But at once,when I use npm run start,it shows many JSX tag errors as unsupported,without changing the code.I cleaned cache,Reinstalled node modules,Reinstalled VS code,Reinstalled NPM .Instead of VS code,I used Atom.But problem could not be solved.On other laptops,this project works well and other projects with .js files with JSX syntaxes performs well on my device.I tried an earlier github folder of this same project,but it is also not working.Below problem was shown on terminal when I run,npm run start.(There are lot of files on project which leads to this error)
Syntax error: C:/software project/my-app/src/App.js: Unexpected token (108:3)
To resume:
The problem is that a dependency as been changed.
https://github.com/ksandaru/voting_app/blob/2d6ad15ff2007061f66e5116600c16a690259397/package.json#L31 undo this line. and run npm install and npm run start
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I have a NodeJS project published on GitHub that uses a few NPM modules, as specified in my package.json. I have my package-lock.json committed into the repo.
Recently I got notices on my repository about a recently-discovered security vulnerability in one of my dependencies. Upon further inspection, it wasn't one of my direct dependencies that had a vulnerability but rather a module that one of my dependencies is dependent on. Because all the modules show up in my package-lock.json, the notice comes up telling me to update that dependency to the latest version.
- myproject
- someDependency
- anotherDependency
- aSubDependency
- anotherOne <--- this one has a security issue
So now I have to question: Is it worth committing a package-lock.json? I wouldn't have any security vulnerabilities in my project if I didn't have a package-lock.json. Now, I am forced to update my project and republish simply to update the package-lock.json. If that file wasn't there at all, the problem would fix itself because anyone who does an install or update of my project using ONLY the package.json would automatically get the updated dependency from up the stream.
Think about it like this. Bob creates moduleA. Then someone else creates moduleB that is dependent on moduleA. Then 1000 developers out in the world create various projects that directly are dependent on moduleB. If Bob discovers a security vulnerability in moduleA, now 1000 people have to make an update to their 1000 projects just to fix this all because they were committing their package-lock.json.
So it is worth it? Do the advantages of package-lock.json outweigh the drawbacks in this topic?
Yes, it worth
This file is intended to be committed into source repositories, and
serves various purposes:
Describe a single representation of a dependency tree such that
teammates, deployments, and continuous integration are guaranteed to
install exactly the same dependencies.
Provide a facility for users to “time-travel” to previous states of
node_modules without having to commit the directory itself.
To facilitate greater visibility of tree changes through readable
source control diffs.
And optimize the installation process by allowing npm to skip repeated
metadata resolutions for previously-installed packages.
See npm documentation
See GitHub - "Viewing and updating vulnerable dependencies in your repository"
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I looked into npm's package.json file and discovered that npm is actually just a node.js package which has a lot of dependencies such as lodash. This means the situation that happened with left-pad package that broke a lot of npm packages could affect npm too.
I see that there is some tendency: pip is written in python, RubyGems in Ruby, Composer in PHP, Maven in Java and so on. But is it good to write a package manager in the target language?
More specifically npm was written using npm - JavaScript has nothing to do the npm leftpad incident. I can't imagine them not using their own product for several reasons:
It's a tool for managing software dependencies. They must use one. Would you propose they use someone else's? Of course, if you trust your product you're going to use it yourself.
The leftpad "incident" was a policy flaw more than a software flaw which they obviously did not predict or consider to be a serious concern until something serious happened. Therefore, why would this be a reason not to use npm.
Of the hundreds of thousands of packages hosted it can't have happened too often or it would have been fixed long ago. That's quite impressive.
It was pretty easy to fix just be updating the caching policy and so it's not a threat to npm.
Other package management tools have had similar problems (or worse). For example, an entire maven repository went offline due to lack of funding. This is unlikely to happen to npm because it is centralized and there are many large stakeholders who are interested in making sure it stays up.
Incidents like these make the ecosystem more stable and mature.
Like all stories, this will blow over in no time.
The very reason is that npm is the default package manager for the JavaScript runtime environment Node.js
It is natural for the package manager to be written in the language of its runtime.