-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix-install.sh
More file actions
executable file
Β·36 lines (30 loc) Β· 992 Bytes
/
fix-install.sh
File metadata and controls
executable file
Β·36 lines (30 loc) Β· 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
echo "π§ Fixing Electron installation..."
# Change to the project directory
cd /sgoinfre/students/davmoren/editor || exit 1
# Remove node_modules and lockfiles
echo "π¦ Removing old node_modules..."
rm -rf node_modules
rm -f pnpm-lock.yaml
# Install with pnpm
echo "π₯ Installing dependencies with pnpm..."
pnpm install
# Check if electron installed correctly
if [ -f "node_modules/electron/index.js" ]; then
echo "β
Electron installed successfully!"
echo "π Starting the application..."
pnpm run electron:start
else
echo "β Electron installation failed. Trying with npm..."
rm -rf node_modules
rm -f package-lock.json
npm install --legacy-peer-deps
if [ -f "node_modules/electron/index.js" ]; then
echo "β
Electron installed with npm!"
echo "π Starting the application..."
npm run electron:start
else
echo "β Installation failed. Please check the logs above."
exit 1
fi
fi