I needed to fix security vulnerabilities for knexnest > knex > minimist. The version for minimist did not get updated with npm audit fix or simple npm update. I followed this article and it updated the versions and gave a vulnerability score of 0. But now when I create a docker image (build) my repo, it fails at the preinstall script.
npx: installed 5 in 5.29s
EACCES: permission denied, open './package-lock.json'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-service#1.2.3 preinstall: `npx npm-force-resolutions`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-service#1.2.3 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /home/node/.npm/_logs/2020-07-15T09_56_56_625Z-debug.log
While installing modules locally on editor, no errors pop up. Please help!
I had the same error, I fixed it with
chmod 666 package-lock.json
This doesn't seem as a root cause solution, but it's a simple workaround.
Related
I have been trying to download a template to start customizing it. Upon downloading it, one is supposed to install all local dependencies using npm install or yarn install. I have done both of those and I have gotten the same error both times. Moreover I have tried using the same command with --force and --legacy-peer-deps, as advised in the error message. I found a GitHub issue discussing this precise problem and some other stack overflow threads. I have tried everything I have come across, and it is just not working. Moreover I have installed the recommended version of node, so that is not the problem either, as suggested in a different thread.
The error message can be seen below.
While resolving: #mui/material#5.2.0
npm ERR! Found: #emotion/react#11.4.1
npm ERR! node_modules/#emotion/react
npm ERR! #emotion/react#"11.4.1" from the root project
npm ERR! peer #emotion/react#"^11.0.0-rc.0" from #emotion/styled#11.3.0
npm ERR! node_modules/#emotion/styled
npm ERR! #emotion/styled#"11.3.0" from the root project
npm ERR! peerOptional #emotion/styled#"^11.3.0" from #mui/material#5.2.0
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"5.2.0" from the root project
npm ERR! 1 more (#mui/icons-material)
npm ERR! 1 more (#mui/styled-engine)
npm ERR! 1 more (#mui/styled-engine)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional #emotion/react#"^11.5.0" from #mui/material#5.2.0
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"5.2.0" from the root project
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.2.0
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"5.2.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #emotion/react#11.7.1
npm ERR! node_modules/#emotion/react
npm ERR! peerOptional #emotion/react#"^11.5.0" from #mui/material#5.2.0
npm ERR! node_modules/#mui/material
npm ERR! #mui/material#"5.2.0" from the root project
npm ERR! peer #mui/material#"^5.0.0" from #mui/icons-material#5.2.0
npm ERR! node_modules/#mui/icons-material
npm ERR! #mui/icons-material#"5.2.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
The template: https://www.creative-tim.com/product/material-dashboard-react?ref=readme-mdr#
GitHub issue: https://github.com/creativetimofficial/material-dashboard-react/issues/171
Thanks in advance.
The problem is that the specific version of #emotion/react used in the template, is not working anymore.
To solve the problem I went to the package.json and changed the version from 11.4.1 to 11.5.0 manually. Seems that the 11.5.0 solves the problem with the template used.
upgrade your version from package.json file and run again "npm install" command
I received this error while not in the folder of my react app. Cd into it and should be good but I am positive you found this answer by now or stumbled upon it like me. Best wishes
I'm using lerna to manage my multirepo with packages that are relating to each other. I did not have this issue before instalation of a new opereating system. Now when I'm trying to use lerna add to add a dependency on package to package, it produces error with the mentioned packages that are not related to either the one that I'm targeting and the one that is a dependency.
Here is my console output:
[filip#filip-thinkpad platform]$ lerna add #devell-platform/webcomponents-base --scope=#devell-platform/web-manual
lerna notice cli v3.18.3
lerna notice filter including "#devell-platform/web-manual"
lerna info filter [ '#devell-platform/web-manual' ]
lerna info Adding #devell-platform/webcomponents-base in 1 package
lerna info Bootstrapping 26 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 1 in '#devell-platform/model'
lerna ERR! npm install stderr:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/#devell-platform%2fbase-types - Not found
npm ERR! 404
npm ERR! 404 '#devell-platform/base-types#0.0.0' 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.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/filip/.npm/_logs/2020-09-27T13_19_58_840Z-debug.log
lerna ERR! npm install exited 1 in '#devell-platform/model'
lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.
lerna ERR! npm install exited 1 in '#devell-platform/model'
lerna ERR! npm install stderr:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/#devell-platform%2fbase-types - Not found
npm ERR! 404
npm ERR! 404 '#devell-platform/base-types#0.0.0' 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.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/filip/.npm/_logs/2020-09-27T13_19_58_840Z-debug.log
lerna ERR! npm install exited 1 in '#devell-platform/model'
lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.
The package #devell-platform/webcomponents-base has no dependency on either #devell-platform/model nor #devell-platform/base-types.
I tried various things, like deleting the model package, but then some other package
is displayed as the cause of the error.
There is no package #devell-platform/webcomponents-base. If it existed before, it must have been removed.
This has nothing to do with lerna but is just a coincidence. A plain install with npm install #devell-platform/webcomponents-base fails as well.
Can someone help. I am completely new to this but when I am running the script I am getting below error. if someone can teach me or help me it would be a great help
functions# deploy /Users/kapilgaur/Downloads/React-Native-APP-master/functions
firebase deploy --only functions
sh: firebase: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! functions# deploy: `firebase deploy --only functions`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the functions# deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/kapilgaur/.npm/_logs/2020-03-05T13_09_05_478Z-debug.log
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.
run this in your terminal
alias firebase="`npm config get prefix`/bin/firebase"
or you just install firebase tool globally
npm install -g firebase-tools
either of them should do the trick,
I have to use an older version of OpenLayers (4.6.2). The examples are really useful to try out and to copy paste from. However the web page with examples contains the latest version.
Is it possible to host OpenLayers examples locally?
What I tried:
checking out 4.6.2 version
npm install
npm run-script start --> Starts a server, but examples won't work
npm run-script transform --> Throws an error like below
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! openlayers#4.6.2 lint: eslint tasks test src examples transforms "--fix"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the openlayers#4.6.2 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\Users\liptak\AppData\Roaming\npm-cache_logs\2018-08-07T14_58_46_839Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! openlayers#4.6.2 transform: npm run changecase-src && npm run transform-src && npm run transform-examples && npm run transform-test && npm run lint -- --fix
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the openlayers#4.6.2 transform script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\Users\liptak\AppData\Roaming\npm-cache_logs\2018-08-07T14_58_46_895Z-debug.log
I suppose it would need a specific version of Node and NPM to build, but I have no idea, how to find that out.
Can someone help me out here? Do I have to build OpenLayers, or there is a simpler solution to start up the examples?
You may try to build examples locally but instead of struggling with the local build system, you can simply access to old versions of OpenLayers API and examples.
To illustrated, for v4.6.2 (upgrade at least to v4.6.5) you can use http://openlayers.org/en/v4.6.2/examples/ and http://openlayers.org/en/v4.6.2/apidoc/
You just need to change in the url the OpenLayers version to get it
I try to install node.js modules using:
npm install express
but I get this error:
npm http GET https://registry.npmjs.org/express
npm ERR! TypeError: Request path contains unescaped characters.
npm ERR! at Agent.request (_http_agent.js:264:11)
npm ERR! at TunnelingAgent.exports.request (http.js:52:22)
npm ERR! at TunnelingAgent.createSocket (/usr/local/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js:117:25)
npm ERR! at TunnelingAgent.createSecureSocket [as createSocket] (/usr/local/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js:184:41)
npm ERR! at TunnelingAgent.addRequest (/usr/local/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js:80:8)
npm ERR! at new ClientRequest (_http_client.js:112:16)
npm ERR! at Agent.request (_http_agent.js:279:10)
npm ERR! at Object.exports.request (https.js:130:22)
npm ERR! at Request.start (/usr/local/lib/node_modules/npm/node_modules/request/index.js:594:30)
npm ERR! at Request.end (/usr/local/lib/node_modules/npm/node_modules/request/index.js:1186:28)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 3.6.11-7.fc16.x86_64
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "express"
npm ERR! cwd /usr/local/src/node
npm ERR! node -v v0.11.5-pre
npm ERR! npm -v 1.3.5
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/local/src/node/npm-debug.log
npm ERR! not ok code 0
May be happening I use a proxy I set it up this way to allow downloads from ips outside my network
export https_proxy='http://172.21.0.12:3128'
I hope you can help me
Set proxy from commandline.
npm config set proxy http://proxydomain:port/
If error occur yet, additional try next.
npm config set registry http://registry.npmjs.org/
These work for me.
(ref http://sushichop.blogspot.jp/2013/01/npm-install.html)
Though late enough, I've bumped into this too after updating nodejs (to 4.1.1) and npm (to something like 1.4.x) on Linux.
I've tried the suggested solution, but changing the registry entry did not help in all cases.
Lastly, having decided to reinstall npm, I found this update source [on npm github][1]
curl -L https://www.npmjs.org/install.sh | sh
which updated my npm to 3.3.8 and all related package installation troubles have been blown away.