Erreur lors du lancement du serveur avec npm run serve - VueJS

Par youstra, il y a 7 ans


Bonjour,

Je n'arrive pas à lancer mon serveur de developpement avec npm.

Ce que je fais

Au depart le projet fonctionnait bien. puis un jour j'ai rencontré cette erreur:

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'serve' ] 2 info using npm@3.5.2 3 info using node@v8.10.0 4 verbose run-script [ 'preserve', 'serve', 'postserve' ] 5 info lifecycle vue-light-bootstrap-dashboard@2.0.0~preserve: vue-light-bootstrap-dashboard@2.0.0 6 silly lifecycle vue-light-bootstrap-dashboard@2.0.0~preserve: no script for preserve, continuing 7 info lifecycle vue-light-bootstrap-dashboard@2.0.0~serve: vue-light-bootstrap-dashboard@2.0.0 8 verbose lifecycle vue-light-bootstrap-dashboard@2.0.0~serve: unsafe-perm in lifecycle true 9 verbose lifecycle vue-light-bootstrap-dashboard@2.0.0~serve: PATH: /usr/share/npm/bin/node-gyp-bin:/home/youstra/Lab/VueProjects/salaamsolution-getting-started/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 10 verbose lifecycle vue-light-bootstrap-dashboard@2.0.0~serve: CWD: /home/youstra/Lab/VueProjects/salaamsolution-getting-started 11 silly lifecycle vue-light-bootstrap-dashboard@2.0.0~serve: Args: [ '-c', 'vue-cli-service serve --open' ] 12 silly lifecycle vue-light-bootstrap-dashboard@2.0.0~serve: Returned: code: 1 signal: null 13 info lifecycle vue-light-bootstrap-dashboard@2.0.0~serve: Failed to exec serve script 14 verbose stack Error: vue-light-bootstrap-dashboard@2.0.0 serve: `vue-cli-service serve --open` 14 verbose stack Exit status 1 14 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16) 14 verbose stack at emitTwo (events.js:126:13) 14 verbose stack at EventEmitter.emit (events.js:214:7) 14 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14) 14 verbose stack at emitTwo (events.js:126:13) 14 verbose stack at ChildProcess.emit (events.js:214:7) 14 verbose stack at maybeClose (internal/child_process.js:925:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 15 verbose pkgid vue-light-bootstrap-dashboard@2.0.0 16 verbose cwd /home/youstra/Lab/VueProjects/salaamsolution-getting-started 17 error Linux 4.18.0-16-generic 18 error argv "/usr/bin/node" "/usr/bin/npm" "run" "serve" 19 error node v8.10.0 20 error npm v3.5.2 21 error code ELIFECYCLE 22 error vue-light-bootstrap-dashboard@2.0.0 serve: `vue-cli-service serve --open` 22 error Exit status 1 23 error Failed at the vue-light-bootstrap-dashboard@2.0.0 serve script 'vue-cli-service serve --open'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the vue-light-bootstrap-dashboard package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error vue-cli-service serve --open 23 error You can get information on how to open an issue for this project with: 23 error npm bugs vue-light-bootstrap-dashboard 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls vue-light-bootstrap-dashboard 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

J'ai alors redemarrer mon ordinateur et tout fonctionnait bien a nouveau. Puis la meme erreur survient, je redemarre alors tout va bien une fois de plus. Et maintenant que l'erreur survient, je redemarre rien ne se passe

Je ne sais vraiment pas d'où me vient cette erreur

6 réponses

Defy, il y a 7 ans

tu as fait une mise à jour de vue-cli? tu as update un package sur ton projet? Tu as upgrader ton os?

youstra, il y a 7 ans

Rien de tous ceci. J'ai toutefois fais un update de mon OS; Ubuntu 18.04 LTS

Defy, il y a 7 ans

Ha ca peut venir de ca. Tu as remove le node_modules et réinstallé?

youstra, il y a 7 ans

Non non, j'ai pas essayé ça.

youstra, il y a 7 ans

Je ne comprends plas ce qui se passe.
J'ai supprimé le dossier node_modules. Puis j'ai fait un "npm install" et tout à coup tout marche bien.
Voilà qu'aujourd'hui encore j'ai la même erreur

Defy, il y a 7 ans

Alors je sais que moi avec angular j'ai eu un soucie avec ubuntu 18 et j'ai downgrade mon os pour que cela remarche. Le watching de fichier ne marchais pas et il y avait des soucies avec les package npm.