diff --git a/Troubleshooting-issues-with-samples.md b/Troubleshooting-issues-with-samples.md index 9d37a08..512dfcb 100644 --- a/Troubleshooting-issues-with-samples.md +++ b/Troubleshooting-issues-with-samples.md @@ -35,7 +35,7 @@ Please note that warnings will rarely prevent the solution from working; We only graph TD A[Run npm install] A --> B{Errors?} - B --> |Yes| C{Are you in root of project?} --> |No| D[Change directory] --> |Retry|A + B --> |Yes| C{Are you in root of project?} --> |No| D[Change directory to root of project] --> |Retry|A B --> |No| E{Running on Windows?} E --> |Yes| F{Path too long?} --> |Yes| H[Move project to shorter path] --> |Retry|A E --> |No| K[Run spfx doctor] @@ -44,21 +44,15 @@ graph TD M --> |No| O[Open a ticket from sample's README] click K "https://github.com/pnp/sp-dev-fx-webparts/wiki/Troubleshooting-issues-with-samples#run-spfx-doctor" style K fill:#f9f,stroke:#333,stroke-width:4px + style D fill:#f9f,stroke:#333,stroke-width:4px ``` -### `npm WARN saveError ENOENT: no such file or directory` +### Change directory to root of project Make sure that you are running `npm install` in the root folder where the web part code is located. There should be an existing `package.json` file. **Do not** create a `package.json`, because the solution must already have one -- otherwise it would not have been accepted as a sample. If you're already currently in the root of the sample solution, take a look to see if the sample contains sub-components; are there any folders named `webparts` (or something similar)? If so, try looking for the `README.md` for instructions on how to build the sample. -### `Build FAILED` - -You should see at least one line showing `npm ERR!` in the many many lines of diagnostics after running `npm install`. - -Look for messages such as `Not compatible with your version of node/npm`. - -Try [running `spfx doctor`](#run-spfx-doctor) to make sure your environment is compatible with the solution. ## Sample won't build