steemit / devportal

Steem Platform Developer Documentation.
https://developers.steem.io
MIT License
122 stars 74 forks source link

Can't get started with tutorials - Missing dependencies - Windows 10 #219

Closed RenaudGagne closed 5 years ago

RenaudGagne commented 6 years ago

Hey guys, don't want to bug you too much but I'm trying to go through the developer portal step by step and I keep hitting roadblocks.

Here: https://developers.steem.io/tutorials-javascript/getting-started

It tells me:

Your Dev Environment These tutorials require Node.js 8+. Yarn is nice, but not required. Runnable versions of the tutorials are located in this github repo. If you haven’t chosen an editor, you can use Atom, Sublime, Intellij, Vi, etc. If you want to keep multiple versions of Node on your system try Node Version Manager.

Which I have installed but when I follow you instructions, here is what I get:

npm i

> secp256k1@3.5.0 install C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\secp256k1
> npm run rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."

> secp256k1@3.5.0 rebuild C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\secp256k1
> node-gyp rebuild

C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\secp256k1>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:182:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\secp256k1
gyp ERR! node -v v10.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! secp256k1@3.5.0 rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the secp256k1@3.5.0 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\renau\AppData\Roaming\npm-cache\_logs\2018-06-10T11_43_00_200Z-debug.log
"Secp256k1 bindings compilation fail. Pure JS implementation will be used."

> node-sass@4.8.3 install C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.3/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.3/win32-x64-64_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

> node-sass@4.8.3 postinstall C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --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\\renau\\Desktop\\DevWork\\Tools\\devportal-tutorials-js\\tutorials\\01_blog_feed\\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@10.3.0 | 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\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:182:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:182:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python2\n    at getNotFoundError (C:\\Users\\renau\\Desktop\\DevWork\\Tools\\devportal-tutorials-js\\tutorials\\01_blog_feed\\node_modules\\which\\which.js:13:12)\n
   at F (C:\\Users\\renau\\Desktop\\DevWork\\Tools\\devportal-tutorials-js\\tutorials\\01_blog_feed\\node_modules\\which\\which.js:68:19)\n    at E (C:\\Users\\renau\\Desktop\\DevWork\\Tools\\devportal-tutorials-js\\tutorials\\01_blog_feed\\node_modules\\which\\which.js:80:29)\n    at C:\\Users\\renau\\Desktop\\DevWork\\Tools\\devportal-tutorials-js\\tutorials\\01_blog_feed\\node_modules\\which\\which.js:89:16\n    at C:\\Users\\renau\\Desktop\\DevWork\\Tools\\devportal-tutorials-js\\tutorials\\01_blog_feed\\node_modules\\isexe\\index.js:42:5\n    at C:\\Users\\renau\\Desktop\\DevWork\\Tools\\devportal-tutorials-js\\tutorials\\01_blog_feed\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:182:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:182:21)
gyp verb `which` failed  python { Error: not found: python
gyp verb `which` failed     at getNotFoundError (C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:182:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python\n    at getNotFoundError (C:\\Users\\renau\\Desktop\\DevWork\\Tools\\devportal-tutorials-js\\tutorials\\01_blog_feed\\node_modules\\which\\which.js:13:12)\n
  at F (C:\\Users\\renau\\Desktop\\DevWork\\Tools\\devportal-tutorials-js\\tutorials\\01_blog_feed\\node_modules\\which\\which.js:68:19)\n    at E (C:\\Users\\renau\\Desktop\\DevWork\\Tools\\devportal-tutorials-js\\tutorials\\01_blog_feed\\node_modules\\which\\which.js:80:29)\n    at C:\\Users\\renau\\Desktop\\DevWork\\Tools\\devportal-tutorials-js\\tutorials\\01_blog_feed\\node_modules\\which\\which.js:89:16\n    at C:\\Users\\renau\\Desktop\\DevWork\\Tools\\devportal-tutorials-js\\tutorials\\01_blog_feed\\node_modules\\isexe\\index.js:42:5\n    at C:\\Users\\renau\\Desktop\\DevWork\\Tools\\devportal-tutorials-js\\tutorials\\01_blog_feed\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:182:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:182:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\renau\\Desktop\\DevWork\\Tools\\devportal-tutorials-js\\tutorials\\01_blog_feed\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\renau\Desktop\DevWork\Tools\devportal-tutorials-js\tutorials\01_blog_feed\node_modules\node-sass
gyp ERR! node -v v10.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN 01_blog_feed@0.0.1 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.8.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.8.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\renau\AppData\Roaming\npm-cache\_logs\2018-06-10T11_43_02_899Z-debug.log
RenaudGagne commented 6 years ago

So after failing with npm, I tried with yarn. I got much further but still, here is what I get on the localhost 3000 (after another set of warning and issues)

screenshot-localhost-3000-2018 06 10-10-34-00

inertia186 commented 6 years ago

So it worked with yarn but you got console warnings?

RenaudGagne commented 6 years ago

well, I don't know if the above screenshot is what it's supposed to look like. Doesn't look much of a tutorial to me.

RenaudGagne commented 6 years ago
λ yarn run start
yarn run v1.7.0
$ webpack && node ./index.js
DEPRECATION WARNING on line 1, column 8 of stdin:
Including .css files with @import is non-standard behaviour which will be removed in future versions of LibSass.
Use a custom importer to maintain this behaviour. Check your implementations documentation on how to create a custom importer.

Hash: a9e224877823362e3474
Version: webpack 4.12.0
Time: 2846ms
Built at: 06/10/2018 10:54:15 AM
        Asset     Size  Chunks                    Chunk Names
    bundle.js  769 KiB       0  [emitted]  [big]  main
bundle.js.map  1.6 MiB       0  [emitted]         main
 [0] (webpack)/buildin/global.js 489 bytes {0} [built]
 [4] ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./public/app.scss 175 KiB {0} [built]
 [5] ./public/app.scss 1.17 KiB {0} [built]
[10] ./public/app.js 1.18 KiB {0} [built]
[11] multi ./public/app.js ./public/app.scss 40 bytes {0} [built]
    + 7 hidden modules

WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
  bundle.js (769 KiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  main (769 KiB)
      bundle.js

WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/
listening on port 3000
feruzm commented 6 years ago

well, I don't know if the above screenshot is what it's supposed to look like. Doesn't look much of a tutorial to me.

Screenshot looks good and correct... Warning messages are normal coming from webpack. Purpose of first tutorial is to show how to fetch blog posts from specific account e.g. @steemitblog. README of that tutorial explains steps and code.