Skip to content

Commit a87b08d

Browse files
committed
Add troubleshooting page
1 parent 494269b commit a87b08d

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ If you want to watch the browser as it runs the test, rather than running headle
121121
USE_HEADLESS=no $(npm bin)/jest --runInBand test/integration/backpack.test.js
122122
```
123123

124+
## Troubleshooting
125+
126+
[Troubleshooting](troubleshooting.md)
127+
124128
## Publishing to GitHub Pages
125129
You can publish the GUI to github.io so that others on the Internet can view it.
126130
[Read the wiki for a step-by-step guide.](https://github.com/LLK/scratch-gui/wiki/Publishing-to-GitHub-Pages)

troubleshooting.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Ignoring optional dependencies
2+
3+
When running `npm install`, you can get warnings about optionsl dependencies:
4+
5+
```
6+
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
7+
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
8+
```
9+
10+
You can suppress them by adding the `no-optional` switch:
11+
12+
```
13+
npm install --no-optional
14+
```
15+
16+
Further reading: [Stack Overflow](https://stackoverflow.com/questions/36725181/not-compatible-with-your-operating-system-or-architecture-fsevents1-0-11)
17+
18+
# Resolving dependencies
19+
20+
When installing for the first time, you can get warnings which need to be resolved:
21+
22+
```
23+
npm WARN [email protected] requires a peer of babel-eslint@^8.0.1 but none was installed.
24+
npm WARN [email protected] requires a peer of eslint@^4.0 but none was installed.
25+
npm WARN [email protected] requires a peer of react-intl-redux@^0.7 but none was installed.
26+
npm WARN [email protected] requires a peer of react-responsive@^4 but none was installed.
27+
```
28+
29+
You can check which versions are available:
30+
31+
```
32+
npm view react-intl-redux@0.* version
33+
```
34+
35+
You will neet do install the required version:
36+
37+
```
38+
npm install --no-optional --save-dev react-intl-redux@^0.7
39+
```
40+
41+
The dependency itself might have more missing dependencies, which will show up like this:
42+
43+
```
44+
user@machine:~/sources/scratch/scratch-gui (491-translatable-library-objects)$ npm install --no-optional --save-dev react-intl-redux@^0.7
45+
[email protected] /media/cuideigin/Linux/sources/scratch/scratch-gui
46+
47+
└── UNMET PEER DEPENDENCY [email protected]
48+
```
49+
50+
You will need to install those as well:
51+
52+
```
53+
npm install --no-optional --save-dev react-responsive@^5.0.0
54+
```
55+
56+
Further reading: [Stack Overflow](https://stackoverflow.com/questions/46602286/npm-requires-a-peer-of-but-all-peers-are-in-package-json-and-node-modules)

0 commit comments

Comments
 (0)