-
Notifications
You must be signed in to change notification settings - Fork 75
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
The fixing way for running issue: 'npm start' this repo #77
Comments
TypeScript 4.6 is incompatible with older versions of Angular such as the one used in this repository. See https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3. |
Also, only use this starter repo for Angular v4 or v5. Library projects have been built in to Angular CLI since version 6 if I recall correctly. |
But when you do "npm start" in this repo, it doesn't work for some reason. How to fix it? If you can't change the version of TypeScript in package.json |
Use:
(I prefer Volta to manage Node.js versions) Then modify "@types/node": "~6.0.46",
"browser-sync": "~2.12.12",
"lite-server": "~2.2.2", Finally: npm install
npm start Outcome: <demo-app ng-version="4.1.3">
<my-lib _nghost-c0="">
<h2 _ngcontent-c0="">Hello Angular Library</h2>
</my-lib>
<h3>Meaning is: 42</h3>
</demo-app> |
I got to know how to fix the 'Invalid 'reference' directive syntax' issue after you cloned the repo, did 'npm install', and did 'npm start'.
The solution is to update the package.json, update the typescript version:
package.json:
"devDependencies": {
"typescript": "^4.6.3"
}
So, update the typescript version to the latest one (the current latest version is 4.6.3).
The text was updated successfully, but these errors were encountered: