Closed gerbendekker closed 6 years ago
Thank you for raising this issue. I was not aware of the problem. I will take a look.
I am not sure about the inclusion of the yarn.lock
file and will do some research on that too. The https://yarnpkg.com/lang/en/docs/yarn-lock/#toc-current-package-only heading says:
During install Yarn will only use the top-level yarn.lock file and will ignore any yarn.lock files that exist within dependencies. The top-level yarn.lock file includes everything Yarn needs to lock the versions of all packages in the entire dependency tree.
It might be that in our package we need to include the aurelia-router
as a peer dependency... #learning
How did you create the ASP.NET Core Aurelia Spa Template? In the dotnet new
list, I see only React and Angular templates.
Found it. We need to install the SPA templates like this first:
dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
Then we can run
dotnet new aurelia
So, I was not able to reproduce your error with the ASP.NET Core Aurelia SPA template, because I'm afraid I do not know how to configure Webpack. If you can provide a sample application, for instance, in a GitHub repository, that would help me a great deal.
What I did do is to ignore both the package.lock.json and the yarn.lock files in the npm publish package. Those changes are included in release 0.19.8 on NPM.
Please let me know whether using the ^0.19.8
release resolves the problem or not.
I reproduced the problem in the repo: aurelia-app-identity-server-aspnetcore
0.19.8 or 0.19.9 had no effect. peerDependencies solved it. All other aurelia packages use 'dependencies', can't find the difference yet, must be missing something.
"During install Yarn will only use the top-level yarn.lock file" Sound logical, but that would assume that consumers always use a root yarn.lock? They might be using none or different kind of 'lock'. As described here lockfiles-for-all, yarn everywhere is not a problem... As far I know, you could use lock files for projects but better not for libs/plugins. Probably it depends.
That's great! Thank you for the fork. I turned the demo into a pull request here:
https://github.com/shaunluttin/aurelia-open-id-connect-demos/pull/1
:clap: :clap: :clap:
What do you mean when you say that, "peerDependencies solved it?"
We have run the demo that you created here: https://github.com/shaunluttin/aurelia-open-id-connect-demos/tree/master/aurelia-app-identity-server-aspnetcore It seems to be working without the use of peerDependencies
.
Yes the demo works, but still have typings errors. Like you mentioned in the readme, a second 'dotnet build' clears the errors in the consol but they are still present.
The first bullet issue is resolved when I delete the folder 'aurelia-app-identity-server-aspnetcore\node_modules\aurelia-open-id-connect\node_modules'.
When changing the 'package.json' dependencies
to peerDependencies
, then on the next npm install
the 'node_modules' are not restored. All it showed is a warning about the 'peerDependencies'.
},
"peerDependencies": {
"aurelia-fetch-client": "^1.1.3",
"aurelia-framework": "^1.1.5",
"aurelia-router": "^1.4.0",
"babel-polyfill": "^6.26.0",
"oidc-client": "^1.4.1"
},
"description": "An Aurelia adapter for the IdentityModel/oidc-client-js.",
"devDependencies": {
I'm not saying it should be 'peerDependencies'.
If you look at for example the 'aurelia-binding' it uses dependencies
but no 'node_modules' are restored. Don't why that is different, still searching... #learning2
Maybe take a look at the structure used by ux or skeleton-plugin
Thank you for that clarification.
Another data point is that the errors happen with the ASP.NET Core template demo but not with the other demos. That could be related to Webpack, ASP.NET Core, or something else that differs.
This is a lead: https://docs.npmjs.com/files/folders#cycles-conflicts-and-folder-parsimony
It might be that the official aurelia packages avoid duplication by having the exact same version of their dependencies.
Currently working on it here, still need to do some bug fixing. Then you can apply it based on your own preferences.
The changes so far:
Thank you. I would like to make comments. Could you please turn it into a pull request. That would let me work in real time with you on it.
done in #44
Thank you. I will take a look. 👍
Hello, I started a new project using the ASP.NET Core SpaTemplate and get this error when adding:
This is because their are two versions of the Aurelia codebase.
When I remove them inside the project node_modules the issue is resolved.![image](https://user-images.githubusercontent.com/11212123/33269137-e8c83d3e-d37f-11e7-8aae-22fcddf68362.png)
Shouldn't the 'yarn.lock' be removed from this repository?