Sep 02 2019 01:08 AM
Hi,
I'm building a solution with SharePoint Framework 1.9.1.
It contains one single but rather complex Webpart. Whenever I do "gulp bundle" (with or without --ship) I'm getting a bunch of warning messages:
[16:37:58] Starting subtask 'configure-webpack'...
[16:37:58] Warning - [configure-webpack] Unable to resolve project "@microsoft/node-core-library". Ensure it has been linked.
[16:37:58] Warning - [configure-webpack] Unable to resolve project "@types/lodash". Ensure it has been linked.
[16:37:58] Warning - [configure-webpack] Unable to resolve project "@microsoft/microsoft-graph-client". Ensure it has been linked.
[16:37:58] Warning - [configure-webpack] Unable to resolve project "@types/adal-angular". Ensure it has been linked.
[16:37:58] Warning - [configure-webpack] Unable to resolve project "adal-angular". Ensure it has been linked.
[16:37:58] Warning - [configure-webpack] Unable to resolve project "es6-collections". Ensure it has been linked.
[16:37:58] Warning - [configure-webpack] Unable to resolve project "@types/requirejs". Ensure it has been linked.
[16:37:58] Warning - [configure-webpack] Unable to resolve project "requirejs". Ensure it has been linked.
[16:37:59] Warning - [configure-webpack] Unable to resolve project "prop-types". Ensure it has been linked.
[16:38:01] Finished subtask 'configure-webpack' after 2.97 s
As far as I can tell the solution is working fine. I didn't import and I'm not directly using any of the mentioned packages in my solution and they aren't referenced in the package.json either.
Does anyone know what can be done to get rid of those warnings? They make it harder to spot the real problems when building the solution.
What I've tried so far:
But all of that didn't affect any single warning.
Hoping someone can help me with that.
Sep 04 2019 03:46 PM - edited Sep 04 2019 03:48 PM
Solution
Hi Christian,
Is this a solution that you're opening from source control, or something you've completely written in your environment?
The first thing I'd do is delete and rebuilt the entire node_modules folder
rm rf node_modules
npm i
If you're not working on this together with a group of people who all need to be on the same exact version of the project (for example if you are working alone in your environment, but you cloned the project from github) I'd delete the package-lock.json file as well before npm i
Sep 05 2019 01:24 AM
thanks for your tips. Initially it didn't work but there were two library components which we developed linked to the solution. So I repeated the same steps for both libraries and after that the warnings disappeared.
I also deleted the package-lock.json in the main solution and the libraries. Why do you think that could be a problem for colleagues working together with me? I looked in our source control system and saw that neither the node_modules nor the package-lock.json are checked in there. So everyone has it's own version of that anyway and the others had no warnings when doing gulp serve on solutions using the library components.
Sep 04 2019 03:46 PM - edited Sep 04 2019 03:48 PM
Solution
Hi Christian,
Is this a solution that you're opening from source control, or something you've completely written in your environment?
The first thing I'd do is delete and rebuilt the entire node_modules folder
rm rf node_modules
npm i
If you're not working on this together with a group of people who all need to be on the same exact version of the project (for example if you are working alone in your environment, but you cloned the project from github) I'd delete the package-lock.json file as well before npm i