-
Notifications
You must be signed in to change notification settings - Fork 1k
Error: Cannot find module 'ajv/dist/core' #10105
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
Comments
npm install ajv@latest --save-dev found the solution in another issue in here. The @latest is the key in this |
I also had another issue with Error: PostCSS plugin postcss-discard-comments requires PostCSS 8. |
Usually, when this happens, you had a glitch when downloading all the dependencies (ie: when npm install ran). Easy fix to try first: Delete node_modules & package-lock.json, then run npm install and try again. You shouldn't have to do anything you did. Try that & see if the issue persists. If so, push your project to a public repo in your GitHub account and share the link in this thread so others can repro. BTW, ideally your OP uses a fenced code block for the contents of your package.json & the response from the console, making it a lot easier to read the two. |
Hello @JonEOffice, |
@JonEOffice, |
I ran into the same issues. The After running |
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
package.json
npm list -g --depth=0 --json
Describe the bug / error
I do yo @microsoft/sharepoint and create a new project. Tried with minimal and with react framework. Both result in the error:
Error: Cannot find module 'ajv/dist/core'
I tried to google it and copilot it, but there seems to be something wrong with the package-lock.json that I create. related with ajv-draft-04
I found a package-json at the training spfx web part.
https://github.com/SharePoint/sp-dev-training-spfx-web-parts/tree/master/Demos/01-webpart
did an npm i on that one and that works, I would like to have one with react loaded or with a working envoirment. How to get this to work?
tried npm install --save-dev ajv, didn't work
Steps to reproduce
Expected behavior
To build succesfull
The text was updated successfully, but these errors were encountered: