Trying to troubleshoot an issue, but not sure why out of the blue, I cannot install gulp locally. This is in any folder on my machine.
Here is what I get:
C:\source\portalTest>npm install gulp
npm ERR! code 128
npm ERR! Command failed: C:\app\cmder\vendor\git-for-windows\cmd\git.EXE clone --depth=1 -q -b 1681/head git://github.com/gulpjs/gulp.git C:\Users\Mark\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-3782b653 --config core.longpaths=true
npm ERR! warning: templates not found C:\Users\Mark\AppData\Local\Temp\pacote-git-template-tmp\git-clone-b45c0eb0
npm ERR! warning: Could not find remote branch 1681/head to clone.
npm ERR! fatal: Remote branch 1681/head not found in upstream origin
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Mark\AppData\Roaming\npm-cache\_logs\2017-06-02T19_24_16_382Z-debug.log
Anyone know why this happened out of the blue and how to fix this? Have tried npm cache clean and anything else I could find on the internet but nothing worked.
Related
I am trying to setup a express.js server using there generator. I have followed the documation and I have succesfully created the basic structure. However if I try to run the given command (SET DEBUG=transcriptverificationserver:* & npm start) to start the server I always get the following error:
npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
npm ERR! npm stars # View packages marked as favorites
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\a\AppData\Local\npm-cache\_logs\2022-11-28T22_43_43_285Z-debug-0.log
PS C:\Users\a\Desktop\Verified Transcripts\Webpage> npm start
npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
npm ERR! npm star # Mark your favorite packages
npm ERR! npm stars # View packages marked as favorites
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\a\AppData\Local\npm-cache\_logs\2022-11-28T22_45_41_209Z-debug-0.log
I assume its an issue within the package.json file. The script part looks as following:
"scripts": {
"start": "node ./bin/www"
},
I haven´t change anything in the files or structure and I was simply copying the commands from the documentation (https://expressjs.com/en/starter/generator.html)
Thanks for any help in advance
I have tried it again and this time everthing works. I am not sure what has happend before but I might have used the old installation method.
$ npm install -g express-generator
$ express
With my secound try I ensured to use the new method:
$ npx express-generator
I have workspace with several packages and plan to reference one to other.
+ root
|-+ packages
|-+ openapi-jsdoc
|-+ api-1
|-+ api-2
My api-1 and api-2 would like to use openapi-jsdoc, which in my imagination is as easy as doing cd packages/api-1; npm install ../openapi-jsdoc. But it is not, and found weird errors.
$ npm install ../packages/openapi-jsdoc
npm ERR! Cannot set properties of null (setting 'dev')
$ npm install packages/openapi-jsdoc
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git#github.com/packages/openapi-jsdoc.git
npm ERR! ERROR: Repository not found.
npm ERR! fatal: Could not read from remote repository.
$ npm install git+file:packages/openapi-jsdoc/
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote file://packages/openapi-jsdoc/
Is there any concept of workspace I'm missed out. Then, how to do this correctly?
Lately, I found out that with every package I want to install I keep getting a error. Its always the same.
What I've tried:
Updating node/NPM
Repairing node/NPM
Fixing git bash in path variable.
Deleting package-lock.json and running npm install
Deleting node_modules and package-lock.json and running npm install.
Clearing npm cache
Manually creating the folder it says it can't find. However, this doesn't change anything.
Manually adding the npm package to package-JSON. running npm install but again. results in an error.
Packages installed fine at first. This has been like this for a week or 2.
short error:
npm ERR! code ENOENT
npm ERR! syscall spawn bash
npm ERR! path C:\Users\Timsl\Documents\FarCryDiscordBot\node_modules\better-sqlite3
npm ERR! errno -4058
npm ERR! enoent spawn bash ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
full log:
https://pastebin.com/1B4yLCLK
Like week ago I installed local package globaly by command npm i -g path.
It worked fine since today. I tried to use npm i -g path again and i get this error:
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path "user"\AppData\Roaming\npm\node_modules\.staging\js2cp-28011c0d\node_modules\fs-extra
npm ERR! dest "user"\AppData\Roaming\npm\node_modules\.staging\fs-extra-d19736e5
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename '"user"\AppData\Roaming\npm\node_modules\.staging\js2cp-28011c0d\node_modules\fs-extra' -> '"user"\AppData\Roaming\npm\node_modules\.staging\fs-extra-d19736e5'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! "user"\AppData\Roaming\npm-cache\_logs\2021-07-27T07_39_50_112Z-debug.log
I wanted to go into "user"\AppData\Roaming\npm\node_modules\ but I cant find folder ./.staging inside the node_modules folder.
Any ideas what's causing this error and how to fix it?
you can do couple things to fix this quickly
a. clean cache: npm cache clean --force
b. delete package.lock
if those two doesnt help youl need to be a bit tricky
c. delete node-modules and then npm install againe (hope this will help)
d. delete node with npm and reinstall it
mostly the a and b will solve the problem for ya!
For me, I was accidentally using node 14, while node 16 was the one I was working with before. After switching to node 16 again the problem was resolved. Might be worth a check before reinstalling node.
Windows 10
node v8.9.2
npm 5.5.1
installed vue-cli through the use of npm but entering 'npm run dev' resulted in an error.
this is error message
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webpack-simple#1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --open --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webpack-simple#1.0.0 dev 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! C:\Users\hansol\AppData\Roaming\npm-cache\_logs\2017-12-08T04_14_50_859Z-debug.log
It appears as though you havent installed the node modules / dependencies.
Please try and run a
npm install
And see if that works
I used to face this problem when the port is busy.
So confirm the port you are opening for the dev server.
you can also change the port using a flag "--port 3000".