Skip to content

Commit 38abb43

Browse files
authored
Merge pull request #136 from InetIntel/135-watch-sass
[135] add a build script to watch for both sass changes and javascript changes at the same time
2 parents 1d73123 + e45d191 commit 38abb43

File tree

2 files changed

+29
-9
lines changed

2 files changed

+29
-9
lines changed

README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@ Web application UI for the IODA project (https://ioda.live)
44

55
## Install
66
1. Ensure PHP 7.2 or higher is running on your machine.
7+
1. TODO: As of 4/30/2024 php 7.3.33 is the highest known working version
78
2. Clone repo locally
89
3. run `brew install composer yarn`
910
4. run `curl -sS https://get.symfony.com/cli/installer | bash`
1011
5. run `composer install`
1112
6. run `yarn install`
13+
1. TODO: As of 4/30/2024 node 16.20.2 is the highest known working version
1214

1315
## Run
14-
the code is two processes:
15-
- yarn compiles the javascript, (watch keeps it checking for updates)
16+
The code is two processes:
17+
- yarn compiles the javascript. The `watch-all` script from `package.json` watches for both sass and js changes.
1618
~~~
17-
yarn encore dev --watch
19+
yarn run watch-all
1820
~~~
1921
- symfony runs the server, there are two ways
2022
- if you have symfony:
@@ -29,18 +31,35 @@ the code is two processes:
2931
Check localhost:8000 in browser
3032
3133
## Possible Problems and Error Messages
34+
35+
### Error 1:
36+
3237
~~~
3338
[ErrorException] curl_multi_setopt(): CURLPIPE_HTTP1 is no longer supported
3439
~~~
3540
36-
Fix with:
37-
1. Updating the global symfony/flex using `composer global require symfony/flex ^1.5`
38-
2. Removing the `vendor/symfony/flex` directory in my project.
39-
3. Running `composer update`.
41+
1. Update the global symfony/flex using `composer global require symfony/flex ^1.5`
42+
2. Remove the `vendor/symfony/flex` directory in my project.
43+
3. Run `composer update`.
4044
45+
### Error 2:
4146
~~~
4247
PHP Fatal error: require(): Failed opening required '/.../ioda-ui/vendor/autoload.php' (include_path='.:/usr/local/Cellar/[email protected]/7.2.25/share/[email protected]/pear') in .../ioda-ui/config/bootstrap.php on line 5
4348
~~~
4449
45-
Fix with:
46-
1. run `composer install` in the /ioda-ui/ folder.
50+
1. Run `composer install` in the /ioda-ui/ folder.
51+
52+
53+
### Error 3:
54+
~~~
55+
// error with "encore dev --watch" which gets run as part of "yarn run watch-all"
56+
57+
Error: digital envelope routines::unsupported
58+
59+
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
60+
library: 'digital envelope routines',
61+
reason: 'unsupported',
62+
code: 'ERR_OSSL_EVP_UNSUPPORTED'
63+
~~~
64+
65+
1. Run `export NODE_OPTIONS=--openssl-legacy-provider` in the terminal.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"dev-server": "encore dev-server",
3838
"dev": "encore dev",
3939
"watch": "encore dev --watch",
40+
"watch-all": "npm-run-all --parallel watch watch:sass",
4041
"prebuild": "npm run sitemap",
4142
"build": "encore production",
4243
"watch:sass": "dart-sass assets/css/ioda/sass/main.scss assets/css/style.css --watch",

0 commit comments

Comments
 (0)