can't resolve app.module.ngfactory when using yarn webpack:prod - angular5

In my application, the front-end and back-end are separated, get this issue when I issue:
yarn webpack:prod
to generate a front-end package for production. however:
yarn start
works fine.
Note:
angular version is 5.1.0
jhipter version is 4.14.3
yarn version is 1.3.2
Very appreciated for any suggestion and help.

upgrade seems too complex, so I regenerate a new jhipster project, the angular 5.1 is upgraded to 5.2. then copy my source code to the new project.
Because #angular/http is updated to #angular/common/http, I did a lot of code change manually, and finally get it worked.

Related

Error: Something went wrong installing the "sharp" module / Something went wrong installing the "sharp" module

I have a Gatsby project using Gatsby version 3.14.3. I need to install gatsby-plugin-image so I can have optimised images in my project. I added necessary configuration in gatsby-config:
plugins: [
`gatsby-plugin-image`,
`gatsby-plugin-sharp`,
`gatsby-transformer-sharp`,
],
and tried installing packages as well:
"gatsby-plugin-image": "1.14.1",
"gatsby-plugin-sharp": "3.14.3",
"gatsby-transformer-sharp": "3.14.0",
Note that I think these package versions are compatible with my current Gatsby version.
I get an error Error: Something went wrong installing the "sharp" module after running yarn run develop. I've tried multiple changes from other people's threads that had similar problem and couldn't make it work. I will look into updating my project to the latest Gatsby version, but it is a big project and I need to prioritise making the images work for now.
Terminal screenshot as reference:

Vercel Deployment: Internal Server Error when updating NPM Packages

I'm currently working on a NUXT 2.x App and I'm hosting the dev Project on Vercel. Now since the NPM packages are outdated and I want to remove some of the packages, the Deployed Version on Vercel throws an empty page with 500 error. If i stash the changes in package.json, everything works fine on the deployed version.
How can I update / remove NPM packages from my current Version and deploy it on Vercel?
Apparently, I had to downgrade the Firebase Version from 9.5 to 9.1, then it deployed just fine on Vercel.
I do recommend the usage of yarn upgrade-interactive --latest to get a list of all the package and the possible updates.
If you want to remove a specific one, go for yarn remove my-not-so-cool-package.
Think about bumping your Node.js version to 14 and try to build locally before pushing to Vercel.
Then, it comes down to reading out the differences that you may have between the versions of the packages and fix the breaking changes if any.
Can't help more without more info from your part.

How to fix errors in Gridsome.js?

Problem Summary
So I'm trying to launch a new Gridsome project for local development. I've toyed with Gridsome in the past and had a great experience, so I decided to give it another shot.
This time around; however, when I run the gridsome create command, the system creates a new Gridsome site directory as expected but returns the following error message:
The instructions in this error message say to enter the newly-created site directory and run gridsome develop to start local development. However, after running cd my-gridsome-site and subsequently running gridsome develop, I then receive this error:
So far, I've tried running npm install --save from the site directory as well as yarn install, both to no avail. Thinking that this was possibly tied to my terminal, I switched from using the Zsh terminal to using the Bash terminal. This also did not work.
I'm at a loss here and could really use a hand.
Thank you for helping,
David
This seems to be an environment error. Gridsome requires Node.js (v8.3+) and recommends Yarn.
Make sure your Node.js version is v8.3+ and use only one package manager like Yarn.
to check node version: node -v
I had this same issue, but I resolved it after installing yarn and running the project with yarn instead of NPM. So you should try using yarn it will help,

How To add CLI Workspace and Other Files to Existing Angular 5 project?

The Problem
On an existing Angular 5x application, I want to upgrade to Angular v8x and take advantage of all the sexy things, including ng generate component. I successfully modified the code to satisfy v8, and changed the npm packages correctly; the app runs (whoo-hoo!). Now, I can't get the Angular cli to work because of missing files like angular.json.
Things I've tried
Using ng new
ng new will create the project files I need, but I didn't want to overwrite my existing code, e.g. app.module.ts, so I ran
ng new my-app --directory [existing source directory of my app]
That overwrote many files, package.json, app.module.ts,etc, so I ran int again as:
ng new revenue --directory=./ --create-application=false --force
A lot of files were preserved, but package.json was not.
The Goal
Have my now upgraded app, running Angular v8, able to run fun things like ng serve
Not have to re-write package.json
Thanks for your help!
Upgrading to Angular 8 should modify package.json.
People typically use ng update to do this (link).
Updating Configuration Files
There are many differences between Angular 4|5 and Angular 6 such as
Angular 6 uses angular.json instead of angular-cli.json.
Different versions of dependencies in package.json etc.
You can update different configuration files automatically by running the following command from the project's root folder:
ng update #angular/cli
What is the ng update Command?
Ng update is a command available in Angular CLI which is used to update your application and its dependencies. You can use it to update all packages in the package.json file via the --all option that could take true or false or specific versions via the --packages option. You can see all the available commands from the official docs.
I ended up creating a brand-new application with ng new my-app, then copying over the files from the existing app. After modifying the code to work with Angular 8, using HttpClient, for example, the app successfully ran. I think I had to do it this way because of the fundamental changes to the project meta files. Hopefully, future upgrades won't be so challenging.

Ember: error while i am running ember serve

I am try to upgrade exisiting ember project cli version by following this tutorial
https://emberigniter.com/update-latest-ember-data-cli/
after finishing this i try to run ember serve it shows error like
missing path
i doknow what exactly it was trying to say and also i am new to ember could any one help me sort out this issue.
I recommend using ember-cli-update to update your ember projects. Please check it out. It avoids user-mistakes while upgrading (no manual merges, etc. ...).
You could try to delete node_modules and run npm install again. It could a package in your package.json that ember serve can't find. Also check the releases it is not easy to upgrade from older version to the latest one, too many deprecations. Also if it si too old i suggest you to start over create again the ember app.