ittus / vue-developer-profile

Developer's portfolio built with Gridsome + VueJS
https://me.coddeine.com/
MIT License
22 stars 6 forks source link

problem in building project #7

Closed farzinnasiri closed 4 years ago

farzinnasiri commented 4 years ago

Hello. after running npm install and installing sum modules this error happend:

info sharp Using cached /home/farzin/.npm/_libvips/libvips-8.7.0-linux-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=12.16.1 runtime=node arch=x64 libc= platform=linux)
make: Entering directory '/home/farzin/js/vue-developer-profile/node_modules/sharp/build'
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
In file included from ../src/common.cc:27:0:
../src/common.h:78:20: error: ‘Handle’ is not a member of ‘v8’
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr);
                    ^~~~~~
../src/common.h:78:37: error: expected primary-expression before ‘>’ token
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr);
                                     ^
../src/common.h:78:39: error: ‘obj’ was not declared in this scope
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr);
                                       ^~~
../src/common.h:78:56: error: expected primary-expression before ‘attr’
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr);
                                                        ^~~~
../src/common.h:78:60: error: expression list treated as compound expression in initializer [-fpermissive]
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr);
                                                            ^
../src/common.h:79:29: error: ‘Handle’ is not a member of ‘v8’
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr);
                             ^~~~~~
../src/common.h:79:46: error: expected primary-expression before ‘>’ token
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr);
                                              ^
../src/common.h:79:48: error: ‘obj’ was not declared in this scope
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr);
                                                ^~~
../src/common.h:79:65: error: expected primary-expression before ‘attr’
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr);
                                                                 ^~~~
../src/common.h:80:38: error: ‘Handle’ is not a member of ‘v8’
   std::vector<double> AttrAsRgba(v8::Handle<v8::Object> obj, std::string attr);
                                      ^~~~~~
../src/common.h:80:55: error: expected primary-expression before ‘>’ token
   std::vector<double> AttrAsRgba(v8::Handle<v8::Object> obj, std::string attr);
                                                       ^
../src/common.h:80:57: error: ‘obj’ was not declared in this scope
   std::vector<double> AttrAsRgba(v8::Handle<v8::Object> obj, std::string attr);
                                                         ^~~
../src/common.h:80:74: error: expected primary-expression before ‘attr’
   std::vector<double> AttrAsRgba(v8::Handle<v8::Object> obj, std::string attr);
                                                                          ^~~~
../src/common.h:81:48: error: ‘Handle’ is not a member of ‘v8’
   template<typename T> v8::Local<T> AttrAs(v8::Handle<v8::Object> obj, std::string attr) {
                                                ^~~~~~
../src/common.h:81:65: error: expected primary-expression before ‘>’ token
   template<typename T> v8::Local<T> AttrAs(v8::Handle<v8::Object> obj, std::string attr) {
                                                                 ^
../src/common.h:81:67: error: ‘obj’ was not declared in this scope
   template<typename T> v8::Local<T> AttrAs(v8::Handle<v8::Object> obj, std::string attr) {
                                                                   ^~~
../src/common.h:81:84: error: expected primary-expression before ‘attr’
   template<typename T> v8::Local<T> AttrAs(v8::Handle<v8::Object> obj, std::string attr) {
                                                                                    ^~~~
../src/common.h:81:37: warning: variable templates only available with -std=c++14 or -std=gnu++14
   template<typename T> v8::Local<T> AttrAs(v8::Handle<v8::Object> obj, std::string attr) {
                                     ^~~~~~
../src/common.h:81:90: error: expected ‘;’ before ‘{’ token
   template<typename T> v8::Local<T> AttrAs(v8::Handle<v8::Object> obj, std::string attr) {
                                                                                          ^
../src/common.h:84:37: error: ‘Handle’ is not a member of ‘v8’
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, std::string attr) {
                                     ^~~~~~
../src/common.h:84:54: error: expected primary-expression before ‘>’ token
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, std::string attr) {
                                                      ^
../src/common.h:84:56: error: ‘obj’ was not declared in this scope
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, std::string attr) {
                                                        ^~~
../src/common.h:84:73: error: expected primary-expression before ‘attr’
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, std::string attr) {
                                                                         ^~~~
../src/common.h:84:26: warning: variable templates only available with -std=c++14 or -std=gnu++14
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, std::string attr) {
                          ^~~~~~
../src/common.h:84:79: error: expected ‘;’ before ‘{’ token
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, std::string attr) {
                                                                               ^
../src/common.h:87:37: error: ‘Handle’ is not a member of ‘v8’
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, int attr) {
                                     ^~~~~~
../src/common.h:87:54: error: expected primary-expression before ‘>’ token
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, int attr) {
                                                      ^
../src/common.h:87:56: error: ‘obj’ was not declared in this scope
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, int attr) {
                                                        ^~~
../src/common.h:87:61: error: expected primary-expression before ‘int’
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, int attr) {
                                                             ^~~
../src/common.h:84:26: warning: variable templates only available with -std=c++14 or -std=gnu++14
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, std::string attr) {
                          ^~~~~~
../src/common.h:87:71: error: expected ‘;’ before ‘{’ token
   template<typename T> T AttrTo(v8::Handle<v8::Object> obj, int attr) {
                                                                       ^
../src/common.h:93:9: error: ‘Handle’ is not a member of ‘v8’
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
         ^~~~~~
../src/common.h:93:26: error: expected primary-expression before ‘>’ token
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
                          ^
../src/common.h:93:28: error: ‘input’ was not declared in this scope
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
                            ^~~~~
../src/common.h:93:28: note: suggested alternative: ‘ino_t’
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
                            ^~~~~
                            ino_t
../src/common.h:93:70: error: expected primary-expression before ‘&’ token
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
                                                                      ^
../src/common.h:93:71: error: ‘buffersToPersist’ was not declared in this scope
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
                                                                       ^~~~~~~~~~~~~~~~
../src/common.h:93:87: error: expression list treated as compound expression in initializer [-fpermissive]
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
                                                                                       ^
../src/common.cc:34:20: error: redefinition of ‘bool sharp::HasAttr’
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr) {
                    ^~~~~~
In file included from ../src/common.cc:27:0:
../src/common.h:78:8: note: ‘bool sharp::HasAttr’ previously defined here
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr);
        ^~~~~~~
../src/common.cc:34:20: error: ‘Handle’ is not a member of ‘v8’
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr) {
                    ^~~~~~
../src/common.cc:34:37: error: expected primary-expression before ‘>’ token
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr) {
                                     ^
../src/common.cc:34:39: error: ‘obj’ was not declared in this scope
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr) {
                                       ^~~
../src/common.cc:34:56: error: expected primary-expression before ‘attr’
   bool HasAttr(v8::Handle<v8::Object> obj, std::string attr) {
                                                        ^~~~
../src/common.cc:37:29: error: redefinition of ‘std::string sharp::AttrAsStr’
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr) {
                             ^~~~~~
In file included from ../src/common.cc:27:0:
../src/common.h:79:15: note: ‘std::string sharp::AttrAsStr’ previously declared here
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr);
               ^~~~~~~~~
../src/common.cc:37:29: error: ‘Handle’ is not a member of ‘v8’
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr) {
                             ^~~~~~
../src/common.cc:37:46: error: expected primary-expression before ‘>’ token
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr) {
                                              ^
../src/common.cc:37:48: error: ‘obj’ was not declared in this scope
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr) {
                                                ^~~
../src/common.cc:37:65: error: expected primary-expression before ‘attr’
   std::string AttrAsStr(v8::Handle<v8::Object> obj, std::string attr) {
                                                                 ^~~~
../src/common.cc:40:38: error: redefinition of ‘std::vector<double> sharp::AttrAsRgba’
   std::vector<double> AttrAsRgba(v8::Handle<v8::Object> obj, std::string attr) {
                                      ^~~~~~
In file included from ../src/common.cc:27:0:
../src/common.h:80:23: note: ‘std::vector<double> sharp::AttrAsRgba’ previously declared here
   std::vector<double> AttrAsRgba(v8::Handle<v8::Object> obj, std::string attr);
                       ^~~~~~~~~~
../src/common.cc:40:38: error: ‘Handle’ is not a member of ‘v8’
   std::vector<double> AttrAsRgba(v8::Handle<v8::Object> obj, std::string attr) {
                                      ^~~~~~
../src/common.cc:40:55: error: expected primary-expression before ‘>’ token
   std::vector<double> AttrAsRgba(v8::Handle<v8::Object> obj, std::string attr) {
                                                       ^
../src/common.cc:40:57: error: ‘obj’ was not declared in this scope
   std::vector<double> AttrAsRgba(v8::Handle<v8::Object> obj, std::string attr) {
                                                         ^~~
../src/common.cc:40:74: error: expected primary-expression before ‘attr’
   std::vector<double> AttrAsRgba(v8::Handle<v8::Object> obj, std::string attr) {
                                                                          ^~~~
../src/common.cc:51:9: error: redefinition of ‘sharp::InputDescriptor* sharp::CreateInputDescriptor’
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
         ^~~~~~
In file included from ../src/common.cc:27:0:
../src/common.h:92:20: note: ‘sharp::InputDescriptor* sharp::CreateInputDescriptor’ previously defined here
   InputDescriptor* CreateInputDescriptor(
                    ^~~~~~~~~~~~~~~~~~~~~
../src/common.cc:51:9: error: ‘Handle’ is not a member of ‘v8’
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
         ^~~~~~
../src/common.cc:51:26: error: expected primary-expression before ‘>’ token
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
                          ^
../src/common.cc:51:28: error: ‘input’ was not declared in this scope
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
                            ^~~~~
../src/common.cc:51:28: note: suggested alternative: ‘ino_t’
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
                            ^~~~~
                            ino_t
../src/common.cc:51:70: error: expected primary-expression before ‘&’ token
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
                                                                      ^
../src/common.cc:51:71: error: ‘buffersToPersist’ was not declared in this scope
     v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
                                                                       ^~~~~~~~~~~~~~~~
cc1plus: warning: unrecognized command line option ‘-Wno-cast-function-type’
sharp.target.mk:138: recipe for target 'Release/obj.target/sharp/src/common.o' failed
make: *** [Release/obj.target/sharp/src/common.o] Error 1
make: Leaving directory '/home/farzin/js/vue-developer-profile/node_modules/sharp/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:311:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.15.0-91-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/farzin/js/vue-developer-profile/node_modules/sharp
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN bootstrap@4.3.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.3.1 requires a peer of popper.js@^1.14.7 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.21.3 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sharp@0.21.3 install 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!     /home/farzin/.npm/_logs/2020-04-01T11_40_10_048Z-debug.log

Can you help me please?

ittus commented 4 years ago

Hi, which node version are you using?

farzinnasiri commented 4 years ago

hi, this: Node.js v12.16.1.

ittus commented 4 years ago

It might relate to this issue https://github.com/lovell/sharp/issues/1668 Can you try upgrading gridsome by running npm install gridsome@0.7.13 --save?

farzinnasiri commented 4 years ago

tnx. but now when gridsome is being compiled I have multiple errors with: Error: ENOENT: no such file or directory, scandir '/home/farzin/js/vue-developer-profile/node_modules/node-sass/vendor' like:

 error  in ./src/assets/styles/index.scss

Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: ENOENT: no such file or directory, scandir '/home/farzin/js/vue-developer-profile/node_modules/node-sass/vendor'
    at Object.readdirSync (fs.js:871:3)
    at Object.getInstalledBinaries (/home/farzin/js/vue-developer-profile/node_modules/node-sass/lib/extensions.js:131:13)
    at foundBinariesList (/home/farzin/js/vue-developer-profile/node_modules/node-sass/lib/errors.js:20:15)
    at foundBinaries (/home/farzin/js/vue-developer-profile/node_modules/node-sass/lib/errors.js:15:5)
    at Object.module.exports.missingBinary (/home/farzin/js/vue-developer-profile/node_modules/node-sass/lib/errors.js:45:5)
    at module.exports (/home/farzin/js/vue-developer-profile/node_modules/node-sass/lib/binding.js:15:30)
    at Object.<anonymous> (/home/farzin/js/vue-developer-profile/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at getDefaultSassImpl (/home/farzin/js/vue-developer-profile/node_modules/sass-loader/dist/index.js:198:10)
    at Object.loader (/home/farzin/js/vue-developer-profile/node_modules/sass-loader/dist/index.js:80:29)

 @ ./src/assets/styles/index.scss 4:14-216 14:3-18:5 15:22-224
 @ ./src/main.js
 @ ./node_modules/gridsome/app/app.js
 @ ./node_modules/gridsome/app/entry.client.js
 @ multi webpack/hot/dev-server webpack-hot-middleware/client?name=app&reload=true&noInfo=true ./node_modules/gridsome/app/entry.client.js ./node_modules/gridsome/app/entry.sockjs.js

and another error:

 error  in ./src/components/PortfolioCard.vue?vue&type=custom&index=0&blockType=static-query

Module build failed (from ./node_modules/gridsome/lib/plugins/vue-components/lib/loaders/static-query.js):
Error: Cannot query field "title" on type "Project".

GraphQL request:81:9
80 |         content
81 |         title
   |         ^
82 |         id
    at Object.module.exports (/home/farzin/js/vue-developer-profile/node_modules/gridsome/lib/plugins/vue-components/lib/loaders/static-query.js:38:21)

 @ ./src/components/PortfolioCard.vue?vue&type=custom&index=0&blockType=static-query 1:0-343 1:359-362 1:364-704 1:364-704
 @ ./src/components/PortfolioCard.vue
 @ ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/babel-loader/lib??ref--1-1!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/Index.vue?vue&type=script&lang=js&
 @ ./src/pages/Index.vue?vue&type=script&lang=js&
 @ ./src/pages/Index.vue
 @ ./src/.temp/routes.js
 @ ./node_modules/gridsome/app/router.js
 @ ./node_modules/gridsome/app/entry.sockjs.js
 @ multi webpack/hot/dev-server webpack-hot-middleware/client?name=app&reload=true&noInfo=true ./node_modules/gridsome/app/entry.client.js ./node_modules/gridsome/app/entry.sockjs.js
ittus commented 4 years ago

I have updated gridsome , it works with node v12.

Please check again and let me know if there is another issue.