gtalarico / flask-vuejs-template

Flask + Vue JS Template
MIT License
1.43k stars 309 forks source link

Installation doesn't work #24

Open ghost opened 5 years ago

ghost commented 5 years ago

As recommended, I did:

$ pyenv install 3.6.9
$ pipenv install --dev
$ pipenv shell
$ yarn install

At first, yarn warns me of the following:

info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@vue/cli-plugin-babel > babel-loader@8.0.0-beta.6" has unmet peer dependency "webpack@>=2".
warning "@vue/cli-plugin-eslint > eslint-loader@2.1.0" has unmet peer dependency "webpack@>=2.0.0 <5.0.0".
warning "@vue/eslint-config-standard > eslint-config-standard@12.0.0-alpha.0" has unmet peer dependency "eslint@>=5.0.0-alpha.2".
warning "@vue/eslint-config-standard > eslint-plugin-import@2.14.0" has unmet peer dependency "eslint@2.x - 5.x".
warning "@vue/eslint-config-standard > eslint-plugin-node@6.0.1" has unmet peer dependency "eslint@>=3.1.0".
warning "@vue/eslint-config-standard > eslint-plugin-standard@3.1.0" has unmet peer dependency "eslint@>=3.19.0".
warning " > sass-loader@6.0.7" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".

Then the install goes on, spend some time on sass, and concludes by hundreds of error lines ending by:

make: *** [binding.target.mk:125: Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory '/home/kerybas/codes/flask-vuejs/flask-vuejs-template/node_modules/node-sass/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/kerybas/codes/flask-vuejs/flask-vuejs-template/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.19.80-1-MANJARO
gyp ERR! command "/usr/bin/node" "/home/kerybas/codes/flask-vuejs/flask-vuejs-template/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/kerybas/codes/flask-vuejs/flask-vuejs-template/node_modules/node-sass
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1

I am not familiar with yarn and sass, I'm not able to troubleshoot that.

loleg commented 4 years ago

Run yarn upgrade , then yarn should work again.

clecocel commented 4 years ago

I have the same error while deploying to Heroku using the 1-click deploy link. Is there anything to do to fix this ? Thanks in advance !

Here is the log:

binding.target.mk:131: recipe for target 'Release/obj.target/binding/src/binding.o' failed
       make: *** [Release/obj.target/binding/src/binding.o] Error 1
       make: Leaving directory '/tmp/build_4fb7e25a_/node_modules/node-sass/build'
       gyp ERR! build error 
       gyp ERR! stack Error: `make` failed with exit code: 2
       gyp ERR! stack     at ChildProcess.onExit (/tmp/build_4fb7e25a_/node_modules/node-gyp/lib/build.js:262:23)
       gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
       gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
       gyp ERR! System Linux 4.4.0-1077-aws
       gyp ERR! command "/tmp/build_4fb7e25a_/.heroku/node/bin/node" "/tmp/build_4fb7e25a_/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
       gyp ERR! cwd /tmp/build_4fb7e25a_/node_modules/node-sass
       gyp ERR! node -v v12.18.4
       gyp ERR! node-gyp -v v3.8.0
       gyp ERR! not ok 
       Build failed with error code: 1
-----> Build failed
clecocel commented 4 years ago

Ok, I fixed it by forking the project, running indeed yarn upgrade and yarn install in my forked repo, then committing the yarn.lock to my fork, and finally creating a deploy on Heroku with the correct buildpacks. Then it worked perfectly.

Thanks !