Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to update packages to get this to work #1

Open
nachbar opened this issue Mar 1, 2020 · 4 comments
Open

Need to update packages to get this to work #1

nachbar opened this issue Mar 1, 2020 · 4 comments

Comments

@nachbar
Copy link

nachbar commented Mar 1, 2020

I followed the instructions in the book:

git clone https://github.com/angular-in-action/invoice
cd invoice
git checkout start
npm install

However, I get a build error. Also, ng serve gives an error.

The problem seems to be that some of the packages do not work with my (current) version of node:
https://www.npmjs.com/package/node-sass

Fixing that seems to require:
npm install node-sass
npm install fsevents

Now, ng serve compiles successfully
But you still have to start the api server to get the application to run:
npm run api

@drievkoo
Copy link

drievkoo commented Apr 7, 2020

I am getting a ton of compilation errors starting from MdIconModule and others.

@gnomeontherun
Copy link
Contributor

This is a limitation of Angular and dependencies, you can downgrade Node versions to v8 and should be able to correctly build and compile for this version of Angular.

@iTaylor5
Copy link

iTaylor5 commented Apr 2, 2022

I changed my Node version to 8 as per your recommendation, but Angular CLI is not happy about it and throws an error.

ng serve
Node.js version v8.17.0 detected.
The Angular CLI requires a minimum Node.js version of either v12.20, v14.15, or v16.10.

Please update your Node.js version or visit https://nodejs.org/ for additional instructions.

What could I do to run this application?

@gnomeontherun
Copy link
Contributor

Given the drift of Angular dependencies and Node changes, the best thing would be to do the following using a newer version of Node and latest Angular CLI. I'm writing this quickly without testing, but it should get you close and I'll try to test when I have some time next week.

  1. Create a new project
ng new invoices
  1. Copy some files or directories (override the same paths from this repo into the new project)
db.json
src/
  1. Add a snippet in angular.json in the scripts array
"node_modules/@covalent/core/common/platform.scss",
  1. Then you can do ng serve. If other errors appear it might be due to some other things that I haven't tested yet so let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants