Upgrading jhipster from v5.0.1 to the latest - npm

I am running linux 18.04, installed java 8. I am struggling with upgrading the current version of jhipster (v5.0.1)to the latest. I have used, yo, yarn and npm but there is no success.
With npm I get an error below, with yo i get the [subsequent] error:
Using JHipster version installed globally Executing jhipster:upgradeOptions:
Welcome to the JHipster Upgrade Sub-Generator
This will upgrade your current application codebase to the latest JHipster version
events.js:174
throw er; // Unhandled 'error' event
^
Error: ERROR! Current directory does not contain a JHipster project.
at Environment.error (/usr/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:157:40)
at module.exports.error (/usr/lib/node_modules/generator-jhipster/generators/generator-base.js:1981:18)
at module.exports.assertJHipsterProject (/usr/lib/node_modules/generator-jhipster/generators/upgrade/index.js:144:26)
at Object.<anonymous> (/usr/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:399:25)
at /usr/lib/node_modules/generator-jhipster/node_modules/run-async/index.js:25:25
at new Promise (<anonymous>)
at /usr/lib/node_modules/generator-jhipster/node_modules/run-async/index.js:24:19
at self.env.runLoop.add.completed (/usr/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:400:11)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
Emitted 'error' event at:
at Immediate.setImmediate (/usr/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:406:18)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
[subsequent]
? Generators to update (Press <space> to select, <a> to toggle all, <i> to invert selection)generator-jhipster
Unhandled rejection Error: EACCES: permission denied, open '/home/lelo/.npm/_cacache/index-v5/ad/54/831265f841b3fd278d23c4c96b06a32656a62c88fddaa7739f419602a04d'
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! /home/lelo/.npm/_logs/2019-08-25T22_22_40_369Z-debug.log```
Despite any user type, I am not getting the expected output which is the upgraded version of jhipster. What could I be doing wrong?

Make sure you are in your application directory and have git installed.
Then execute jhipster upgrade.
You will probably have to solve some problems of the resulting merge arising during the update.
More info: https://www.jhipster.tech/upgrading-an-application/

Related

Getting error when installing Bugsnag 'Error: spawn npm ENOENT'

this is the first time I post here so apologies if I don't follow some rules or incorrect formatting.
I'm making an app using React Native and Expo and when I try to install bugsnag I get this error.
$ npx bugsnag-expo-cli init
√ #bugsnag/expo does not appear to be installed, do you want to install it? ... yes
√ If you want the latest version of #bugsnag/expo hit enter, otherwise type the version you want ... latest
√ Using yarn or npm? » npm
> Installing #bugsnag/expo with npm. This could take a while!
Error: spawn npm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Are you attempting to run the bugsnag-expo-cli on Windows? The Expo CLI currently only supports MacOS and Linux:
https://docs.bugsnag.com/platforms/react-native/expo/#installation-and-configuration
As an alternative to the CLI, you can follow the manual integration guide:
https://docs.bugsnag.com/platforms/react-native/expo/manual-setup/

Vue.js: Error after configuring Router.js. Vue/types/umd. chokidar (C drive error)

I was running a dev server after changing my router.js file. Adding a webpage .vue file to the configuration. After doing so it failed to compile with only one errors. This is the output:
This dependency was not found:
* vue/types/umd in ./src/router.js
To install it, you can run: npm install --save vue/types/umd
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\swapfile.sys'
I tried the advice, and installed vue/types/umd and it still compiled with an error. I then uploaded my project to GitLab. Deleted the project on my Documents folder then downloaded it again. Used npm install then the typical npm run serve and still the same error.
Check if by accident this kind of import didn't appear in your file ./src/router.js. I had this error when this line appeared in my file. Probably I pressed some key when wanted to use nextTick. In your case it could be attempt to import router. So when I removed this import line everything went back to normal.
import { nextTick } from 'vue/types/umd';
npm install --save vue/types/umd
npm ERR! code ENOLOCAL
npm ERR! Could not install from "vue/types/umd" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/lenovo/.npm/_logs/2022-05-16T17_40_02_280Z-debug.log

How to fix "Error: Watching remote files is not supported" problem in Visual Studio Code

I have Vue application that I don't run for a while and now I cannot start development server?! In meanwhile something updated and that don't work. I tried new clean vue/vuetify install and same problem!
Build for production works normally, only run development server don't work.
And important notice: when run "npm run serve" in command prompt (outside VS Code), it works normally. That not work only in VS Code Terminal. What is problem?
Node version is v10.16.0
Npm version is 6.10.3
VS Code About:
Commit: 036a6b1d3ac84e5ca96a17a44e63a87971f8fcc8
Date: 2019-08-08T02:33:50.993Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.17763
Error (from terminal window):
> Executing task: npm run serve <
> portal#0.1.0 serve d:\Wamp64\www\portal
> vue-cli-service serve
INFO Starting development server...
10% building 2/2 modules 0 active ERROR Error: Watching remote files is not supported.
Error: Watching remote files is not supported.
at Server.setupWatchStaticFeature (d:\Wamp64\www\portal\node_modules\webpack-dev-server\lib\Server.js:405:13)
at Object.watchContentBase (d:\Wamp64\www\portal\node_modules\webpack-dev-server\lib\Server.js:477:14)
at forEach (d:\Wamp64\www\portal\node_modules\webpack-dev-server\lib\Server.js:550:24)
at Array.forEach (<anonymous>)
at Server.setupFeatures (d:\Wamp64\www\portal\node_modules\webpack-dev-server\lib\Server.js:549:49)
at new Server (d:\Wamp64\www\portal\node_modules\webpack-dev-server\lib\Server.js:125:10)
at serve (d:\Wamp64\www\portal\node_modules\#vue\cli-service\lib\commands\serve.js:139:20)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:832:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! portal#0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the portal#0.1.0 serve 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\Sasa Gosovic\AppData\Roaming\npm-cache\_logs\2019-08-11T10_35_40_418Z-debug.log
The terminal process terminated with exit code: 1
Press any key to close the terminal.
Exactly the same issue here. I resolved it by rolling back the version of webpack-dev-server.
npm install webpack-dev-server#3.7.2 --save-dev
Looks like the setupWatchStaticFeature function has changed between 3.7.2 and 3.8.0 which is triggering the issue.
You can eddit the vue.config.js file, adding following code:
devServer: {
contentBase: './public'
}
More details: https://github.com/webpack/webpack-dev-server/issues/2190#issuecomment-520670599
Until the issue is open, a workaround could be to use Git Bash instead of Windows command line to run npm run serve. I modified Server.js to output the contentBase variable. When using Windows command line or Vue UI, the variable contained "c:\...". Using Git Bash on my Windows 10 machine it contains "C:\..." and it worked.

Unhandled rejection error: invalid config key requested when attempting to update Cypress via NPM

I am trying to update Cypress to the latest version using the following provided command:
npm install --save-dev cypress#3.2.0
In previous versions this has worked fine with no errors. Now, when I run this, I keep getting the following error:
Unhandled rejection Error: invalid config key requested: agentn 099cbf610e4ce787
at BadKeyError (/usr/local/lib/node_modules/npm/node_modules/figgy-pudding/index.js:93:23)
at pudGet (/usr/local/lib/node_modules/npm/node_modules/figgy-pudding/index.js:101:5)
at FiggyPudding.get (/usr/local/lib/node_modules/npm/node_modules/figgy-pudding/index.js:27:12)
at Object.get (/usr/local/lib/node_modules/npm/node_modules/figgy-pudding/index.js:159:16)
at new PacoteOptions (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/util/opt-check.js:9:21)
at optCheck (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/util/opt-check.js:63:10)
at Object.manifest (/usr/local/lib/node_modules/npm/node_modules/pacote/manifest.js:11:10)
at fetchPackageMetadata (/usr/local/lib/node_modules/npm/lib/fetch-package-metadata.js:58:10)
at limited (/usr/local/lib/node_modules/npm/node_modules/call-limit/call-limit.js:29:10)
at /usr/local/lib/node_modules/npm/lib/install/deps.js:235:14
at /usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:35
at Array.forEach (<anonymous>)
at /usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:52:11
at Array.forEach (<anonymous>)
at asyncMap (/usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:51:8)
at exports.getAllMetadata (/usr/local/lib/node_modules/npm/lib/install/deps.js:206:3)
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jaswindersingh/.npm/_logs/2019-03-15T13_32_13_190Z-debug.log
Could anyone point me to what this means and how I can fix it?
Never seen this kind of error before?
And as far as I know I've not made any changes to any of my packages in either package.json or package-lock.json etc (from what I have read so far from similar posts)
I think this is an npm issue.
Try to delete package-lock.json and run your command again. This should solve your problem.
Also, if you can, try to upgrade your npm version, since this issue is marked as closed in npm repository.
It is really npm issue. Try to change version to some up-to-date one. If there is some problems with it, you can use nvm.
In my case I`ve changed node version 10.8.0 to 12.18.3 and npm as well.

Anything related to Zurb Foundation in Node JS throws the same error

I am trying to access the template from this repository: https://github.com/zurb/foundation-sites-template
I successfully cloned the repository, but apparently, in order to get the actual sass, I need to install npm dependencies. So I ran npm install, only to get this error:
events.js:160░░░░░░⸩ ⠼ extract:interpret: sill extract interpret#1.0.4
throw er; // Unhandled 'error' event
^
Error: write after end
at writeAfterEnd (_stream_writable.js:193:12)
at PassThrough.Writable.write (_stream_writable.js:240:5)
at PassThrough.Writable.end (_stream_writable.js:477:10)
at ReadEntry.entry.on (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/extract-stream.js:19:41)
at emitOne (events.js:101:20)
at ReadEntry.emit (events.js:188:7)
at ReadEntry.emit (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
at ReadEntry.[maybeEmitEnd] (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:249:12)
at ReadEntry.end (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:162:27)
at Unpack.[consumeBody] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:210:13)
at Unpack.[consumeChunkSub] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:391:40)
at Unpack.[consumeChunk] (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:362:30)
at Unzip.(anonymous function).on.chunk (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:291:59)
at emitOne (events.js:96:13)
at Unzip.emit (events.js:188:7)
at Unzip.emit (/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
I am using npm version 6.0.0 and node v6.11.2. Running on a mac.
After this I tried installing the foundation cli with npm install foundation-cli --global, but got the exact same error. As far as I know, I meet all the requirements as listed on the github repository, not sure what could be the problem.
Well, turns out it was either my npm or node version. I updated both to the most recent (npm 6.4.1, node v10.8.0) versions, and npm install ran fine. I suppose what can be learned here is that when dealing with zurb foundation, just try to use the latest software.