Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug vagrant provisioning failure #15

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

fishilico
Copy link

Hello,

As I would like to see what ProjetSigma look like, I am looking forward to build a virtual machine with it. Currently the provided Vagrant configuration file fails in several places and this Pull Request fixes some of them. With it, there is one last failure I do not understand, when running npm install --loglevel=info as user vagrant in /vagrant/frontend:

[22:54:48] Requiring external module ts-node/register
TSError: ⨯ Unable to compile TypeScript
src/shared/services/api-service.ts (7,23): Cannot find module '../../config'. (2307)
src/shared/services/auth-service.ts (3,23): Cannot find module '../../config'. (2307)
    at getOutput (/vagrant/frontend/node_modules/ts-node/src/ts-node.ts:210:13)
    at Object.loader (/vagrant/frontend/node_modules/ts-node/src/ts-node.ts:225:23)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Liftoff.handleArguments (/vagrant/frontend/node_modules/gulp/bin/gulp.js:116:3)
    at Liftoff.<anonymous> (/vagrant/frontend/node_modules/liftoff/index.js:198:16)
    at module.exports (/vagrant/frontend/node_modules/flagged-respawn/index.js:17:3)
    at Liftoff.<anonymous> (/vagrant/frontend/node_modules/liftoff/index.js:190:9)

npm info lifecycle [email protected]~postinstall: Failed to exec postinstall script
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! Linux 3.13.0-107-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--loglevel=info"
npm ERR! node v5.12.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: `typings install && gulp check.versions && npm prune`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'typings install && gulp check.versions && npm prune'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sigma package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     typings install && gulp check.versions && npm prune
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs sigma
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls sigma
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /vagrant/frontend/npm-debug.log

I do not understand this error so any hint about what would have gone wrong would be appreciated :)
Cheers!

The script was writing "${DISTRO}" as-is in
/etc/apt/sources.list.d/nodesource.list, which prevented the system from
installing node.
The installation failed when installing Django 1.9 because six was not
automatically upgraded:

    django-rest-swagger==0.3.6 : pkg_resources.VersionConflict: (six
    1.5.2 (/usr/lib/python3/dist-packages),
    Requirement.parse('six>=1.10.0'))

Fix this by upgrading six by hand.

Moreover Django wants debug_toolbar.middleware.DebugToolbarMiddleware
into its MIDDLEWARE apps, as
ProjetSigma/backend@37fc065
did in some branch of the backend. Otherwise Django was complaining:

    ==> default: + python3 manage.py migrate
    ==> default: SystemCheckError: System check identified some issues:
    ==> default:
    ==> default: ERRORS:
    ==> default: ?: debug_toolbar.middleware.DebugToolbarMiddleware is
    missing from MIDDLEWARE_CLASSES.
    ==> default:    HINT: Add
    debug_toolbar.middleware.DebugToolbarMiddleware to
    MIDDLEWARE_CLASSES.
The Node package from Ubuntu 14.04 is too old so install Node 5 when
running "apt-get install -yqq nodejs". Moreover do not install npm as it
is provided by nodejs package.
In order to make it easier to find bugs/failures, stop the provisionning
as soon as an error happens.
@Hugo-Trentesaux
Copy link
Member

Hugo-Trentesaux commented Jan 23, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants