tejado / telegram-nearby-map

Discover the location of nearby Telegram users 📡🌍
GNU General Public License v3.0
1.04k stars 149 forks source link

× Build failed. @parcel/core: Failed to resolve 'ol/ol.css' from './web-src/web.js' #10

Closed EkoPTH closed 2 years ago

EkoPTH commented 2 years ago

Hello buddy, i have problem when i run the app.

C:\Program Files\telegram-nearby-map-main>npm start

start npm run buildParcel && npm run startServer

buildParcel parcel build ./web-src/index.html --public-url / --dist-dir ./web-build/

× Build failed.

@parcel/core: Failed to resolve 'ol/ol.css' from './web-src/web.js'

C:\Program Files\telegram-nearby-map-main\web-src\web.js:1:8

1 | import 'ol/ol.css'; | ^^^^^^^^^^^ 2 | import Map from 'ol/Map'; 3 | import Overlay from 'ol/Overlay';

tejado commented 2 years ago

Hi,

what node version are you using?

EkoPTH commented 2 years ago

My node version V16.13.0 and npm 8.1.0

tejado commented 2 years ago

Did you execute npm install? What is the content of your node_modules folder?

EkoPTH commented 2 years ago

Sure. too many contents in my node_modules folder, but i have @babel folder until yaml folder.

tejado commented 2 years ago

Can you verify that ol/ol.css is existing in the node_modules folder?

EkoPTH commented 2 years ago

Maybe, i will trying in nodejs and npm old version. What node and npm version are you using ?

tejado commented 2 years ago

I just testet it with your version and it worked fine.

EkoPTH commented 2 years ago

Got it, ol/ol.css not existing in my node_modules folder.

tejado commented 2 years ago

Interessting, did npm install fail? Can you execute it again please?

EkoPTH commented 2 years ago

how do i get it ?, do i have to execute npm install command again ?

tejado commented 2 years ago

Yes

EkoPTH commented 2 years ago

C:\Program Files\nodejs>npm install npm ERR! code 1 npm ERR! path C:\Program Files\telegram-nearby-map-main\node_modules\tdl-tdlib-addon npm ERR! command failed npm ERR! command C:\Wedhus\system32\cmd.exe /d /s /c node-gyp rebuild npm ERR! 'node-gyp' is not recognized as an internal or external command, npm ERR! operable program or batch file.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\USER\AppData\Local\npm-cache_logs\2021-11-21T14_58_29_359Z-debug.log

tejado commented 2 years ago

Yeah... please check https://spin.atomicobject.com/2019/03/27/node-gyp-windows/

EkoPTH commented 2 years ago

thanks, can you share it, ol/ol.css content ?

tejado commented 2 years ago

No, you need to have a full install of all packages. Package ol is just missing, because npm install failed on the tdl-tdlib-addon part, which need to be fixed. Please see the guide. First thing to do is: npm install --global windows-build-tools, as I guess your build tools are missing.

EkoPTH commented 2 years ago

Got it, Thank you very much mate.