quran / quran.com-frontend

quran.com frontend
https://quran.com
MIT License
990 stars 361 forks source link

Errors when cloning #926

Closed iliyaML closed 6 years ago

iliyaML commented 6 years ago

I followed the steps to run the app locally. In short, I cloned it, installed the dependencies (installed pm2 as well) and run npm run dev. However, there are some errors that appear during installation and when I am trying to run it.

Can someone tell me what I missed or did wrong?

thabti commented 6 years ago

salam,

can you share the error you're getting? thanks.

thehungrycoder commented 6 years ago

Not sure if @iliyaML is getting same error but I am getting following errors in a fresh clone when I run npm run dev

94% asset optimization./src/client.js
Module build failed: TypeError: /Sites/quran.com-frontend/src/client.js: Cannot read property 'length' of null
   at PluginPass.exit (/Sites/quran.com-frontend/node_modules/react-hot-loader/lib/babel.js:117:28)
   at newFn (/Sites/quran.com-frontend/node_modules/babel-traverse/lib/visitors.js:276:21)
   at NodePath._call (/Sites/quran.com-frontend/node_modules/babel-traverse/lib/path/context.js:76:18)
   at NodePath.call (/Sites/quran.com-frontend/node_modules/babel-traverse/lib/path/context.js:48:17)
   at NodePath.visit (/Sites/quran.com-frontend/node_modules/babel-traverse/lib/path/context.js:117:8)
   at TraversalContext.visitQueue (/Sites/quran.com-frontend/node_modules/babel-traverse/lib/context.js:150:16)
   at TraversalContext.visitSingle (/Sites/quran.com-frontend/node_modules/babel-traverse/lib/context.js:108:19)
   at TraversalContext.visit (/Sites/quran.com-frontend/node_modules/babel-traverse/lib/context.js:192:19)
   at Function.traverse.node (/Sites/quran.com-frontend/node_modules/babel-traverse/lib/index.js:114:17)
   at traverse (/Sites/quran.com-frontend/node_modules/babel-traverse/lib/index.js:79:12)
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server babel-polyfill webpack-dev-server/client?http://localhost:8080 webpack/hot/only-dev-server bootstrap-loader/lib/bootstrap.loader?configFilePath=/Sites/quran.com-frontend/src/styles/bootstrap.config.json!bootstrap-loader/no-op.js ./src/client.js
[webpack-isomorphic-tools] [error] asset not found: ./node_modules/quran-components/lib/images/background.jpg
[webpack-isomorphic-tools] [error] asset not found: ./static/images/logo-lg-w.png
raven@1.1.1 alert: no DSN provided, error reporting disabled
raven@1.1.1 alert: Enabled automatic breadcrumbs for console
raven@1.1.1 alert: Enabled automatic breadcrumbs for http
raven@1.1.1 alert: getContext called without context; this may indicate incorrect setup - refer to docs on contexts
==> 🌎  ENV=development
==> ✅  Server is listening at http://localhost:8000
==> 🎯  API at http://staging.quran.com:3000
==> host localhost
==> port 8000
==> api http://staging.quran.com:3000
==> oneQuran http://localhost:3030
==> sentryClient
==> sentryServer
==> facebookAppId 1599019233731707
==> fontsURL //quran-1f14.kxcdn.com
==> defaultLocale en
==> isProduction false
Warning: Failed prop type: Invalid prop `juzs.errored` of type `boolean` supplied to `Home`, expected `object`.
   in Home
Warning: Failed prop type: Invalid prop `title` of type `object` supplied to `Tab`, expected `string`.
   in Tab
Warning: Failed prop type: Invalid prop `className` of type `boolean` supplied to `MenuItem`, expected `string`.
   in MenuItem
Warning: Unknown prop `static` on <nav> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
   in nav (created by Navbar)
   in Navbar (created by Uncontrolled(Navbar))
   in Uncontrolled(Navbar) (created by GlobalNav)
   in GlobalNav (created by LoadableComponent)
   in LoadableComponent (created by Route)
   in Route (created by Navbars)
   in Switch (created by Navbars)
   in Navbars (created by App)
   in div (created by App)
   in App (created by MetricsContainer)
   in MetricsContainer (created by Connect(MetricsContainer))
   in Connect(MetricsContainer) (created by Route)
   in Route (created by withRouter(Connect(MetricsContainer)))
   in withRouter(Connect(MetricsContainer))
   in Router (created by StaticRouter)
   in StaticRouter
   in Provider
   in ThemeProvider
   in IntlProvider
Warning: Unknown props `active`, `activeKey`, `activeHref` on <li> tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop
   in li (created by GlobalNav)
   in ul (created by Nav)
   in Nav (created by GlobalNav)
   in div (created by Grid)
   in Grid (created by Navbar)
   in nav (created by Navbar)
   in Navbar (created by Uncontrolled(Navbar))
   in Uncontrolled(Navbar) (created by GlobalNav)
   in GlobalNav (created by LoadableComponent)
   in LoadableComponent (created by Route)
   in Route (created by Navbars)
   in Switch (created by Navbars)
   in Navbars (created by App)
   in div (created by App)
   in App (created by MetricsContainer)
   in MetricsContainer (created by Connect(MetricsContainer))
   in Connect(MetricsContainer) (created by Route)
   in Route (created by withRouter(Connect(MetricsContainer)))
   in withRouter(Connect(MetricsContainer))
   in Router (created by StaticRouter)
   in StaticRouter
   in Provider
   in ThemeProvider
   in IntlProvider
 GET / 200 1187.940 ms - -

FWIW, the site is loading but broken styles!

screen shot 2018-01-24 at 9 49 40 pm
iliyaML commented 6 years ago

These are the errors I get when running npm install:

`$ npm install

node-zopfli@2.0.2 install C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.c om-frontend\node_modules\node-zopfli node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://node-zopfli.s3.amazonaws.com/R elease/zopfli-v2.0.2-node-v57-win32-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for node-zopfli@2.0.2 and node@8. 9.3 (node-v57 ABI, unknown) (falling back to source compile with node-gyp) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tool s versions are "4.0". gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\iliya\Videos\Sandbox\Project s\quran\quran.com-frontend\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:198:12) gyp ERR! System Windows_NT 10.0.16299 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\iliya\Videos \Sandbox\Projects\quran\quran.com-frontend\node_modules\node-gyp\bin\nod e-gyp.js" "build" "--fallback-to-build" "--module=C:\Users\iliya\Videos\Sand box\Projects\quran\quran.com-frontend\node_modules\node-zopfli\lib\bindin g\node-v57-win32-x64\zopfli.node" "--module_name=zopfli" "--module_path=C:\Us ers\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\ node-zopfli\lib\binding\node-v57-win32-x64" gyp ERR! cwd C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\nod e_modules\node-zopfli gyp ERR! node -v v8.9.3 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.e xe C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\ node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\iliya\Video s\Sandbox\Projects\quran\quran.com-frontend\node_modules\node-zopfli\lib\binding \node-v57-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\iliy a\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\node-zopfli\lib\ binding\node-v57-win32-x64' (1) node-pre-gyp ERR! stack at ChildProcess. (C:\Users\iliya\Videos\S andbox\Projects\quran\quran.com-frontend\node_modules\node-pre-gyp\lib\util\comp ile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:126:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/chi ld_process.js:209:5) node-pre-gyp ERR! System Windows_NT 10.0.16299 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\iliy a\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\node-pre- gyp\bin\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-fro ntend\node_modules\node-zopfli node-pre-gyp ERR! node -v v8.9.3 node-pre-gyp ERR! node-pre-gyp -v v0.6.39 node-pre-gyp ERR! not ok Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\iliya\Videos\Sandbo x\Projects\quran\quran.com-frontend\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\iliya\Videos\Sandbox\Projects\quran\quran. com-frontend\node_modules\node-zopfli\lib\binding\node-v57-win32-x64\zopfli.node --module_name=zopfli --module_path=C:\Users\iliya\Videos\Sandbox\Projects\quran \quran.com-frontend\node_modules\node-zopfli\lib\binding\node-v57-win32-x64' (1)

phantomjs-prebuilt@2.1.16 install C:\Users\iliya\Videos\Sandbox\Projects\quran \quran.com-frontend\node_modules\phantomjs-prebuilt node install.js

PhantomJS not found on PATH Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantom js-2.1.1-windows.zip Saving to C:\Users\iliya\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zi p Receiving...

Received 17767K total. Extracting zip contents Removing C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_mo dules\phantomjs-prebuilt\lib\phantom Copying extracted folder C:\Users\iliya\AppData\Local\Temp\phantomjs\phantomjs-2 .1.1-windows.zip-extract-1516850137074\phantomjs-2.1.1-windows -> C:\Users\iliya \Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\phantomjs-prebuil t\lib\phantom Writing location.js file Done. Phantomjs binary available at C:\Users\iliya\Videos\Sandbox\Projects\quran \quran.com-frontend\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.ex e

chromedriver@2.22.2 install C:\Users\iliya\Videos\Sandbox\Projects\quran\quran .com-frontend\node_modules\chromedriver node install.js

WARN invalid config loglevel="notice" Downloading http://chromedriver.storage.googleapis.com/2.22/chromedriver_win32.z ip Saving to C:\Users\iliya\AppData\Local\Temp\chromedriver\chromedriver_win32.zip Receiving... Received 781K... Received 1564K... Received 2346K... Received 2672K total. Extracting zip contents Copying to target path C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-fr ontend\node_modules\chromedriver\lib\chromedriver Done. ChromeDriver binary available at C:\Users\iliya\Videos\Sandbox\Projects\qu ran\quran.com-frontend\node_modules\chromedriver\lib\chromedriver\chromedriver.e xe

node-sass@4.1.1 install C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com -frontend\node_modules\node-sass node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.1 .1/win32-x64-57_binding.node Cannot download "https://github.com/sass/node-sass/releases/download/v4.1.1/win3 2-x64-57_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, e.g.

  export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

  npm config set proxy http://example.com:8080

phantomjs@1.9.20 install C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.co m-frontend\node_modules\phantomjs node install.js

PhantomJS not found on PATH Download already available at C:\Users\iliya\AppData\Local\Temp\phantomjs\phanto mjs-1.9.8-windows.zip Verified checksum of previously downloaded file Extracting zip contents Removing C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_mo dules\phantomjs\lib\phantom Copying extracted folder C:\Users\iliya\AppData\Local\Temp\phantomjs\phantomjs-1 .9.8-windows.zip-extract-1516850156119\phantomjs-1.9.8-windows -> C:\Users\iliya \Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\phantomjs\lib\pha ntom Writing location.js file Done. Phantomjs binary available at C:\Users\iliya\Videos\Sandbox\Projects\quran \quran.com-frontend\node_modules\phantomjs\lib\phantom\phantomjs.exe

pre-commit@1.1.3 install C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.co m-frontend\node_modules\pre-commit node install.js

pre-commit: pre-commit: Failed to symlink the hook file in your .git/hooks folder because: pre-commit: EPERM: operation not permitted, symlink '....\node_modules\pre-comm it\hook' -> 'C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend.gi t\hooks\pre-commit' pre-commit: The hook was not installed. pre-commit:

spawn-sync@1.0.13 postinstall C:\Users\iliya\Videos\Sandbox\Projects\quran\qur an.com-frontend\node_modules\spawn-sync node postinstall

uglifyjs-webpack-plugin@0.4.6 postinstall C:\Users\iliya\Videos\Sandbox\Projec ts\quran\quran.com-frontend\node_modules\uglifyjs-webpack-plugin node lib/post_install.js

gifsicle@3.0.4 postinstall C:\Users\iliya\Videos\Sandbox\Projects\quran\quran. com-frontend\node_modules\gifsicle node lib/install.js

√ gifsicle pre-build test passed successfully

mozjpeg@4.1.1 postinstall C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.c om-frontend\node_modules\mozjpeg node lib/install.js

√ mozjpeg pre-build test passed successfully

optipng-bin@3.1.4 postinstall C:\Users\iliya\Videos\Sandbox\Projects\quran\qur an.com-frontend\node_modules\optipng-bin node lib/install.js

(node:14412) MaxListenersExceededWarning: Possible EventEmitter memory leak dete cted. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit √ optipng pre-build test passed successfully

pngquant-bin@3.1.1 postinstall C:\Users\iliya\Videos\Sandbox\Projects\quran\qu ran.com-frontend\node_modules\pngquant-bin node lib/install.js

√ pngquant pre-build test passed successfully

lint-staged@3.6.1 postinstall C:\Users\iliya\Videos\Sandbox\Projects\quran\qur an.com-frontend\node_modules\lint-staged echo "🚫💩 lint-staged installed! Do not forget to configure it. See https://github.com/okonet/lint-staged/blob/ma ster/README.md" && exit 0

"???? lint-staged installed!

node-sass@4.1.1 postinstall C:\Users\iliya\Videos\Sandbox\Projects\quran\quran .com-frontend\node_modules\node-sass node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\Users\iliya\Videos\Sandbox\Project s\quran\quran.com-frontend\node_modules\node-gyp\bin\node-gyp.js rebuild --verbo se --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= gyp info it worked if it ends with ok gyp verb cli [ 'C:\Program Files\nodejs\node.exe', gyp verb cli 'C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-fr ontend\node_modules\node-gyp\bin\node-gyp.js', gyp verb cli 'rebuild', gyp verb cli '--verbose', gyp verb cli '--libsass_ext=', gyp verb cli '--libsass_cflags=', gyp verb cli '--libsass_ldflags=', gyp verb cli '--libsass_library=' ] gyp info using node-gyp@3.6.2 gyp info using node@8.9.3 | win32 | x64 gyp verb command rebuild [] gyp verb command clean [] gyp verb clean removing "build" directory gyp verb command configure [] gyp verb check python checking for Python executable "python2" in the PATH gyp verb which failed Error: not found: python2 gyp verb which failed at getNotFoundError (C:\Users\iliya\Videos\Sandbox\P rojects\quran\quran.com-frontend\node_modules\which\which.js:13:12) gyp verb which failed at F (C:\Users\iliya\Videos\Sandbox\Projects\quran\q uran.com-frontend\node_modules\which\which.js:68:19) gyp verb which failed at E (C:\Users\iliya\Videos\Sandbox\Projects\quran\q uran.com-frontend\node_modules\which\which.js:80:29) gyp verb which failed at C:\Users\iliya\Videos\Sandbox\Projects\quran\qura n.com-frontend\node_modules\which\which.js:89:16 gyp verb which failed at C:\Users\iliya\Videos\Sandbox\Projects\quran\qura n.com-frontend\node_modules\isexe\index.js:42:5 gyp verb which failed at C:\Users\iliya\Videos\Sandbox\Projects\quran\qura n.com-frontend\node_modules\isexe\windows.js:36:5 gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21) gyp verb which failed python2 { Error: not found: python2 gyp verb which failed at getNotFoundError (C:\Users\iliya\Videos\Sandbox\P rojects\quran\quran.com-frontend\node_modules\which\which.js:13:12) gyp verb which failed at F (C:\Users\iliya\Videos\Sandbox\Projects\quran\q uran.com-frontend\node_modules\which\which.js:68:19) gyp verb which failed at E (C:\Users\iliya\Videos\Sandbox\Projects\quran\q uran.com-frontend\node_modules\which\which.js:80:29) gyp verb which failed at C:\Users\iliya\Videos\Sandbox\Projects\quran\qura n.com-frontend\node_modules\which\which.js:89:16 gyp verb which failed at C:\Users\iliya\Videos\Sandbox\Projects\quran\qura n.com-frontend\node_modules\isexe\index.js:42:5 gyp verb which failed at C:\Users\iliya\Videos\Sandbox\Projects\quran\qura n.com-frontend\node_modules\isexe\windows.js:36:5 gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21) gyp verb which failed stack: 'Error: not found: python2\n at getNotFoundE rror (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\no de_modules\which\which.js:13:12)\n at F (C:\Users\iliya\Videos\Sandbox\ \Projects\quran\quran.com-frontend\node_modules\which\which.js:68:19)\n at E (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\no de_modules\which\which.js:80:29)\n at C:\Users\iliya\Videos\Sandbox\Pr ojects\quran\quran.com-frontend\node_modules\which\which.js:89:16\n at C :\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modu les\isexe\index.js:42:5\n at C:\Users\iliya\Videos\Sandbox\Projects\q uran\quran.com-frontend\node_modules\isexe\windows.js:36:5\n at FSReqWrap .oncomplete (fs.js:152:21)', gyp verb which failed code: 'ENOENT' } gyp verb check python checking for Python executable "python" in the PATH gyp verb which succeeded python C:\Python27\python.EXE gyp verb check python version C:\Python27\python.EXE -c "import platform; print (platform.python_version());" returned: "2.7.14\r\n" gyp verb get node dir no --target version specified, falling back to host node v ersion: 8.9.3 gyp verb command install [ '8.9.3' ] gyp verb install input version string "8.9.3" gyp verb install installing version: 8.9.3 gyp verb install --ensure was passed, so won't reinstall if already installed gyp verb install version is already installed, need to check "installVersion" gyp verb got "installVersion" 9 gyp verb needs "installVersion" 9 gyp verb install version is good gyp verb get node dir target node version installed: 8.9.3 gyp verb build dir attempting to create "build" dir: C:\Users\iliya\Videos\Sandb ox\Projects\quran\quran.com-frontend\node_modules\node-sass\build gyp verb build dir "build" dir needed to be created? C:\Users\iliya\Videos\Sandb ox\Projects\quran\quran.com-frontend\node_modules\node-sass\build gyp verb Not using VS2017: Could not use PowerShell to find VS2017 gyp verb build/config.gypi creating config file gyp verb build/config.gypi writing out config file: C:\Users\iliya\Videos\Sandbo x\Projects\quran\quran.com-frontend\node_modules\node-sass\build\config.gypi gyp verb config.gypi checking for gypi file: C:\Users\iliya\Videos\Sandbox\Proje cts\quran\quran.com-frontend\node_modules\node-sass\config.gypi gyp verb common.gypi checking for gypi file: C:\Users\iliya\Videos\Sandbox\Proje cts\quran\quran.com-frontend\node_modules\node-sass\common.gypi gyp verb gyp gyp format was not specified; forcing "msvs" gyp info spawn C:\Python27\python.EXE gyp info spawn args [ 'C:\Users\iliya\Videos\Sandbox\Projects\quran\quran .com-frontend\node_modules\node-gyp\gyp\gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'msvs', gyp info spawn args '-G', gyp info spawn args 'msvs_version=auto', gyp info spawn args '-I', gyp info spawn args 'C:\Users\iliya\Videos\Sandbox\Projects\quran\quran .com-frontend\node_modules\node-sass\build\config.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\iliya\Videos\Sandbox\Projects\quran\quran .com-frontend\node_modules\node-gyp\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\iliya\.node-gyp\8.9.3\include\node\common .gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\Users\iliya\.node-gyp\8.9.3', gyp info spawn args '-Dnode_gyp_dir=C:\Users\iliya\Videos\Sandbox\Project s\quran\quran.com-frontend\node_modules\node-gyp', gyp info spawn args '-Dnode_lib_file=C:\Users\iliya\.node-gyp\8.9.3\<(tar get_arch)\node.lib', gyp info spawn args '-Dmodule_root_dir=C:\Users\iliya\Videos\Sandbox\Proj ects\quran\quran.com-frontend\node_modules\node-sass', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'C:\Users\iliya\Videos\Sandbox\Projects\quran\quran .com-frontend\node_modules\node-sass\build', gyp info spawn args '-Goutput_dir=.' ] gyp verb command build [] gyp verb build type Release gyp verb architecture x64 gyp verb node dev dir C:\Users\iliya.node-gyp\8.9.3 gyp verb found first Solution file build/binding.sln gyp verb could not find "msbuild.exe" in PATH - finding location in registry gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe gyp info spawn args [ 'build/binding.sln', gyp info spawn args '/nologo', gyp info spawn args '/p:Configuration=Release;Platform=x64' ] Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. Build started 1/24/2018 9:16:20 PM. MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tool s versions are "4.0".

Build FAILED.

MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available to ols versions are "4.0".

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:00.08 gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Users\iliya\Videos\Sandbox\Project s\quran\quran.com-frontend\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:198:12) gyp ERR! System Windows_NT 10.0.16299 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\iliya\Videos \Sandbox\Projects\quran\quran.com-frontend\node_modules\node-gyp\bin\nod e-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsasscflags=" "--libsass ldflags=" "--libsass_library=" gyp ERR! cwd C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\nod e_modules\node-sass gyp ERR! node -v v8.9.3 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok Build failed with error code: 1 npm WARN Error: EPERM: operation not permitted, scandir 'C:\Users\iliya\Videos\S andbox\Projects\quran\quran.com-frontend\node_modules\scss-tokenizer\node_module s' npm WARN { Error: EPERM: operation not permitted, scandir 'C:\Users\iliya\Video s\Sandbox\Projects\quran\quran.com-frontend\node_modules\scss-tokenizer\node_mod ules' npm WARN stack: 'Error: EPERM: operation not permitted, scandir \'C:\Users\i liya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\scss-t okenizer\node_modules\'', npm WARN errno: -4048, npm WARN code: 'EPERM', npm WARN syscall: 'scandir', npm WARN path: 'C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com- frontend\node_modules\scss-tokenizer\node_modules' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.1.1 postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.1.1 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\iliya\AppData\Roaming\npm-cache_logs\2018-01-25T03_1628 448Z-debug.log`


These are the errors I get when I run npm run dev: `$ npm run dev

quran@1.0.0 dev C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend cross-env NODE_PATH='./src' PORT=8000 UV_THREADPOOL_SIZE=100 node --expose-gc ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --config ./webpack/dev.config.js --progress & env NODE_PATH='./src' PORT=8000 node --expose-gc ./bin/server.js

94% asset optimization./src/client.js Module build failed: TypeError: C:/Users/iliya/Videos/Sandbox/Projects/quran/quran.com-frontend/src/client.js: Cannot read property 'length' of null at PluginPass.exit (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\react-hot-loader\lib\babel.js:117:29) at newFn (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\babel-traverse\lib\visitors.js:276:21) at NodePath._call (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\babel-traverse\lib\path\context.js:76:18) at NodePath.call (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\babel-traverse\lib\path\context.js:48:17) at NodePath.visit (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\babel-traverse\lib\path\context.js:117:8) at TraversalContext.visitQueue (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\babel-traverse\lib\context.js:150:16) at TraversalContext.visitSingle (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\babel-traverse\lib\context.js:108:19) at TraversalContext.visit (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\babel-traverse\lib\context.js:192:19) at Function.traverse.node (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\babel-traverse\lib\index.js:114:17) at traverse (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\babel-traverse\lib\index.js:79:12) @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server babel-polyfill webpack-dev-server/client?http://localhost:8080 webpack/hot/only-dev-server bootstrap-loader/lib/bootstrap.loader?configFilePath=C:/Users/iliya/Videos/Sandbox/Projects/quran/quran.com-frontend/src/styles/bootstrap.config.json!bootstrap-loader/no-op.js ./src/client.js ./~/css-loader!./~/resolve-url-loader!./~/sass-loader/lib/loader.js?sourceMap!./~/bootstrap-loader/lib/bootstrap.styles.loader.js?{"bootstrapVersion":3,"preBootstrapCustomizations":"C://Users//iliya//Videos//Sandbox//Projects//quran//quran.com-frontend//src//styles//variables.scss","appStyles":"C://Users//iliya//Videos//Sandbox//Projects//quran//quran.com-frontend//src//styles//main.scss","extractStyles":false,"styleLoaders":["style-loader","css-loader","sass-loader"],"styles":["mixins","normalize","scaffolding","type","code","grid","tables","forms","buttons","component-animations","dropdowns","navs","navbar","pagination","pager","labels","badges","list-group","panels","responsive-embed","close","modals","tooltip","popovers","utilities","responsive-utilities"],"scripts":[],"configFilePath":"C://Users//iliya//Videos//Sandbox//Projects//quran//quran.com-frontend//src//styles//bootstrap.config.json","bootstrapPath":"C://Users//iliya//Videos//Sandbox//Projects//quran//quran.com-frontend//~//bootstrap-sass","bootstrapRelPath":"..//bootstrap-sass"}!./~/bootstrap-loader/no-op.js Module build failed: Error: Cannot find module 'node-sass' at Function.Module._resolveFilename (module.js:536:15) at Function._module2.default._resolveFilename (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\require-hacker\babel-transpiled-modules\require hacker.js:423:34) at Function.Module._load (module.js:466:25) at Module.require (module.js:579:17) at require (internal/module.js:11:18) at Object. (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\node_modules\sass-loader\lib\loader.js:3:14) at Module._compile (module.js:635:30) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) @ ./~/style-loader!./~/css-loader!./~/resolve-url-loader!./~/sass-loader/lib/loader.js?sourceMap!./~/bootstrap-loader/lib/bootstrap.styles.loader.js?{"bootstrapVersion":3,"preBootstrapCustomizations":"C://Users//iliya//Videos//Sandbox//Projects//quran//quran.com-frontend//src//styles//variables.scss","appStyles":"C://Users//iliya//Videos//Sandbox//Projects//quran//quran.com-frontend//src//styles//main.scss","extractStyles":false,"styleLoaders":["style-loader","css-loader","sass-loader"],"styles":["mixins","normalize","scaffolding","type","code","grid","tables","forms","buttons","component-animations","dropdowns","navs","navbar","pagination","pager","labels","badges","list-group","panels","responsive-embed","close","modals","tooltip","popovers","utilities","responsive-utilities"],"scripts":[],"configFilePath":"C://Users//iliya//Videos//Sandbox//Projects//quran//quran.com-frontend//src//styles//bootstrap.config.json","bootstrapPath":"C://Users//iliya//Videos//Sandbox//Projects//quran//quran.com-frontend//~//bootstrap-sass","bootstrapRelPath":"..//bootstrap-sass"}!./~/bootstrap-loader/no-op.js 4:14-1271 13:2-17:4 14:20-1277 @ ./~/bootstrap-loader/lib/bootstrap.loader.js?configFilePath=C:/Users/iliya/Videos/Sandbox/Projects/quran/quran.com-frontend/src/styles/bootstrap.config.json!./~/bootstrap-loader/no-op.js @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server babel-polyfill webpack-dev-server/client?http://localhost:8080 webpack/hot/only-dev-server bootstrap-loader/lib/bootstrap.loader?configFilePath=C:/Users/iliya/Videos/Sandbox/Projects/quran/quran.com-frontend/src/styles/bootstrap.config.json!bootstrap-loader/no-op.js ./src/client.js `


I would really appreciate it if someone could help me set this up.

thabti commented 6 years ago

can you share the node and npm versions ? i'd recommend removing node_modules and trying again.

mdbadawi commented 6 years ago

I have the same output Module build failed: npm run dev

quran@1.0.0 dev /home/mohamed/quran cross-env NODE_PATH='./src' PORT=8000 UV_THREADPOOL_SIZE=100 node --expose-gc ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --config ./webpack/dev.config.js --progress & env NODE_PATH='./src' PORT=8000 node --expose-gc ./bin/server.js

53% building modules 365/366 modules 1 active ...ode_modules/bootstrap-loader/no-op.js[webpack-isomorphic-tools] [error] asset not found: ./node_modules/quran-components/lib/images/background.jpg [webpack-isomorphic-tools] [error] asset not found: ./static/images/logo-lg-w.png 94% asset optimization./src/client.js
Module build failed: TypeError: /home/mohamed/quran/src/client.js: Cannot read property 'length' of null at PluginPass.exit (/home/mohamed/quran/node_modules/react-hot-loader/lib/babel.js:117:29) at newFn (/home/mohamed/quran/node_modules/babel-traverse/lib/visitors.js:276:21) at NodePath._call (/home/mohamed/quran/node_modules/babel-traverse/lib/path/context.js:76:18) at NodePath.call (/home/mohamed/quran/node_modules/babel-traverse/lib/path/context.js:48:17) at NodePath.visit (/home/mohamed/quran/node_modules/babel-traverse/lib/path/context.js:117:8) at TraversalContext.visitQueue (/home/mohamed/quran/node_modules/babel-traverse/lib/context.js:150:16) at TraversalContext.visitSingle (/home/mohamed/quran/node_modules/babel-traverse/lib/context.js:108:19) at TraversalContext.visit (/home/mohamed/quran/node_modules/babel-traverse/lib/context.js:192:19) at Function.traverse.node (/home/mohamed/quran/node_modules/babel-traverse/lib/index.js:114:17) at traverse (/home/mohamed/quran/node_modules/babel-traverse/lib/index.js:79:12) @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server babel-polyfill webpack-dev-server/client?http://localhost:8080 webpack/hot/only-dev-server bootstrap-loader/lib/bootstrap.loader?configFilePath=/home/mohamed/quran/src/styles/bootstrap.config.json!bootstrap-loader/no-op.js ./src/client.js

node version:8.9.4 npm version:5.6.0 on ubuntu 16.04 lts

iliyaML commented 6 years ago

Node Version: 8.9.3 NPM Version: 5.5.1

And I'm on Windows.

osaid-ahmad commented 6 years ago

@iliyaML

Try running npm install windows-build-tools and then install the dependencies. For me it eliminated at least the npm install errors.

thabti commented 6 years ago

unfortunately I have no experience with Windows. @naveed-ahmad not sure if you use windows ?

adefirmanf commented 6 years ago

I have a same error on above. Failed when do npm run dev

NPM : v5.5.1
Node : v9.2.0
Ubuntu : 16.04
rozakbuhari commented 6 years ago

I have the same issue, running on: Branch master:

iliyaML commented 6 years ago

I'm still getting this error when running npm run dev:

53% building modules 364/366 modules 2 active ...modules\_array-species-constru 53% building modules 365/366 modules 1 active ...ode_modules\bootstrap-loader\n 53% building modules 366/367 modules 1 active ...de_modules\css-loader\lib\css- 94% asset optimization./src/client.js Module build failed: TypeError: C:/Users/iliya/Videos/Sandbox/Projects/quran/qur an.com-frontend/src/client.js: Cannot read property 'length' of null at PluginPass.exit (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-f rontend\node_modules\react-hot-loader\lib\babel.js:117:29) at newFn (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend\no de_modules\babel-traverse\lib\visitors.js:276:21) at NodePath._call (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-fr ontend\node_modules\babel-traverse\lib\path\context.js:76:18) at NodePath.call (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-fro ntend\node_modules\babel-traverse\lib\path\context.js:48:17) at NodePath.visit (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-fr ontend\node_modules\babel-traverse\lib\path\context.js:117:8) at TraversalContext.visitQueue (C:\Users\iliya\Videos\Sandbox\Projects\quran \quran.com-frontend\node_modules\babel-traverse\lib\context.js:150:16) at TraversalContext.visitSingle (C:\Users\iliya\Videos\Sandbox\Projects\qura n\quran.com-frontend\node_modules\babel-traverse\lib\context.js:108:19) at TraversalContext.visit (C:\Users\iliya\Videos\Sandbox\Projects\quran\qura n.com-frontend\node_modules\babel-traverse\lib\context.js:192:19) at Function.traverse.node (C:\Users\iliya\Videos\Sandbox\Projects\quran\qura n.com-frontend\node_modules\babel-traverse\lib\index.js:114:17) at traverse (C:\Users\iliya\Videos\Sandbox\Projects\quran\quran.com-frontend \node_modules\babel-traverse\lib\index.js:79:12) @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-serve r babel-polyfill webpack-dev-server/client?http://localhost:8080 webpack/hot/onl y-dev-server bootstrap-loader/lib/bootstrap.loader?configFilePath=C:/Users/iliya /Videos/Sandbox/Projects/quran/quran.com-frontend/src/styles/bootstrap.config.js on!bootstrap-loader/no-op.js ./src/client.js

mdbadawi commented 6 years ago

fixed by last commit https://github.com/quran/quran.com-frontend/pull/937 thank you

iliyaML commented 6 years ago

stuck All the errors are gone, but when I run npm run dev, it seems to be stuck right until here. Port 8000 is where I should be able to see everything right?

iliyaML commented 6 years ago

I have the terminal running, but it's still stuck at that line " main.js.map 3.8 MB 28 [emitted] main". And I'm getting the typical site can't be reached when I visit localhost:8000. Were you able to run it after doing a fresh clone and npm install? That's what I did.

mdbadawi commented 6 years ago

it works fine with me with no thing more than fresh clone and npm install

iliyaML commented 6 years ago

Could you share with me your current nodejs and npm version?

Update: nodejs: v8.9.4 npm: 5.6.0

mdbadawi commented 6 years ago

when i restarted server it didn't work anymore

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: watch /home/mdbadawi/quran.com2/src/locale ENOSPC
    at _errnoException (util.js:1022:11)
    at FSWatcher.start (fs.js:1374:19)
    at Object.fs.watch (fs.js:1400:11)
    at createFsWatchInstance (/home/mdbadawi/quran.com2/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/mdbadawi/quran.com2/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/mdbadawi/quran.com2/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/mdbadawi/quran.com2/node_modules/chokidar/lib/nodefs-handler.js:407:19)
    at FSWatcher.<anonymous> (/home/mdbadawi/quran.com2/node_modules/chokidar/lib/nodefs-handler.js:455:19)
    at FSWatcher.<anonymous> (/home/mdbadawi/quran.com2/node_modules/chokidar/lib/nodefs-handler.js:460:16)
    at FSReqWrap.oncomplete (fs.js:153:5)

EDIT: it works again after solving my ENOSPC problem https://stackoverflow.com/questions/22475849/node-js-error-enospc

murtuzasyed commented 6 years ago

@iliyaML , I'm stuck at main.js.map as well.

adefirmanf commented 6 years ago

Server successfully listening on port 8000, but it seems failed to load script main.js image

Should I remove node_modules and do npm install again after few updates? I'm still got error like these. Error on 53% and 94%.

 53% building modules 365/366 modules 1 active ...ode_modules/bootstrap-loader/no-op.js[webpack-isomorphic-tools] [error] asset not found: ./node_modules/quran-components/lib/images/background.jpg
[webpack-isomorphic-tools] [error] asset not found: ./static/images/logo-lg-w.png
 94% asset optimization./src/client.js                                                 
Module build failed: TypeError: /home/caramel/Projects/quran.com-frontend/src/client.js: Cannot read property 'length' of null
    at PluginPass.exit (/home/caramel/Projects/quran.com-frontend/node_modules/react-hot-loader/lib/babel.js:117:29)
    at newFn (/home/caramel/Projects/quran.com-frontend/node_modules/babel-traverse/lib/visitors.js:276:21)
    at NodePath._call (/home/caramel/Projects/quran.com-frontend/node_modules/babel-traverse/lib/path/context.js:76:18)
    at NodePath.call (/home/caramel/Projects/quran.com-frontend/node_modules/babel-traverse/lib/path/context.js:48:17)
    at NodePath.visit (/home/caramel/Projects/quran.com-frontend/node_modules/babel-traverse/lib/path/context.js:117:8)
    at TraversalContext.visitQueue (/home/caramel/Projects/quran.com-frontend/node_modules/babel-traverse/lib/context.js:150:16)
    at TraversalContext.visitSingle (/home/caramel/Projects/quran.com-frontend/node_modules/babel-traverse/lib/context.js:108:19)
    at TraversalContext.visit (/home/caramel/Projects/quran.com-frontend/node_modules/babel-traverse/lib/context.js:192:19)
    at Function.traverse.node (/home/caramel/Projects/quran.com-frontend/node_modules/babel-traverse/lib/index.js:114:17)
    at traverse (/home/caramel/Projects/quran.com-frontend/node_modules/babel-traverse/lib/index.js:79:12)
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server babel-polyfill webpack-dev-server/client?http://localhost:8080 webpack/hot/only-dev-server bootstrap-loader/lib/bootstrap.loader?configFilePath=/home/caramel/Projects/quran.com-frontend/src/styles/bootstrap.config.json!bootstrap-loader/no-op.js ./src/client.js

I will update again after remove node_modules.

adefirmanf commented 6 years ago

It works after delete node_modules and run npm install again image

But I don't get it, when do npm install. PhantomJS must be downloaded and installed twice.

Note : For Ubuntu user x64 or similiar got error on Sass. Try run npm rebuild node-sass Thanks for update 👍

iliyaML commented 6 years ago

@murtuzasyed Please tell me if you find a way to get it resolved.

mdbadawi commented 6 years ago

@iliyaML try to do the link ,it worked with me https://stackoverflow.com/questions/22475849/node-js-error-enospc

iliyaML commented 6 years ago

@dr-mdbadawi I believe that solution is for Linux and you are also running one. I'm currently running Windows 10.

mmahalwy commented 6 years ago

Salam all, sorry, we haven't done a good job of testing on other operating systems outside of OSX. Few things here, and some action items for the team and myself:

For the time being: For those who found a solution, would you mind creating a PR to the README for instructions?

marjan2k commented 6 years ago

Assalamualaikum,

I cloned the repo today to help out with development. I'm on the master branch.

I'm unable to run the development build. Did any recent commits cause this? Strangely the production build works.

WEBPACK: Creating a development bundle configuration for the "client"
DEVELOPMENT: Webpack config is invalid, please check the console for more information.
TypeError: Cannot read property 'path' of undefined
    at /Users/marjan.com/quran.com-frontend/node_modules/happypack/lib/HappyPlugin.js:55:56
    at Array.some (<anonymous>)
    at Object.validate (/Users/marjan.com/quran.com-frontend/node_modules/happypack/lib/HappyPlugin.js:54:24)
    at /Users/marjan.com/quran.com-frontend/node_modules/happypack/lib/OptionParser.js:53:30
    at Array.reduce (<anonymous>)
    at parseAndValidateOptions (/Users/marjan.com/quran.com-frontend/node_modules/happypack/lib/OptionParser.js:31:30)
    at new HappyPlugin (/Users/marjan.com/quran.com-frontend/node_modules/happypack/lib/HappyPlugin.js:27:17)
    at happyPackPlugin (/Users/marjan.com/quran.com-frontend/internal/utils.js:10:10)
    at webpackConfigFactory (/Users/marjan.com/quran.com-frontend/internal/webpack/configFactory.js:363:7)
    at createCompiler (/Users/marjan.com/quran.com-frontend/internal/development/hotDevelopment.js:30:29)
(node:86569) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'path' of undefined
(node:86569) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
marjan2k commented 6 years ago

It appears, the issue persists in the commits since HappyPlugin got added. I can run previous commits just fine.

mmahalwy commented 6 years ago

@marjan2k very odd this is happening. path should be a native module

mmahalwy commented 6 years ago

@marjan2k this is the fix: https://github.com/quran/quran.com-frontend/pull/972 sorry it happened!

hamzeen commented 6 years ago

@marjan2k that was something to do with hot module replacement config. I also faced the same issue but I can confirm PR #972 has fixed it.