2016-07-18 6 views
0

Guten Tag, ich mache derzeit ein Tutorial auf scotch.io, wo ich versuche, einen Musik-Player mit Elektronen und reagieren, aber wenn ich versuche, npm auszuführen laufen sehen‘ich bekomme diese Fehlermeldung:Fehler mit watchify beim Ausführen von npm run watch

[email protected] watch: watchify app/app.js -t babelify -o public/js/bundle.js --debug --verbose

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the [email protected] watch script 'watchify app/app.js -t babelify -o public/js/bundle.js --debug --verbose'.

npm ERR! This is most likely a problem with the electron-quick-start package,

npm ERR! not with npm itself.

npm ERR! Tell the author that this fails on your system:

npm ERR! watchify app/app.js -t babelify -o public/js/bundle.js --debug --verbose

npm ERR! You can get information on how to open an issue for this project with:

npm ERR! npm bugs electron-quick-start

npm ERR! Or if that isn't available, you can get their info via:

npm ERR!

npm ERR! npm owner ls electron-quick-start

npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:

npm ERR! C:\Users\Alejandro\Documents\Proyectos\music-player\npm-debug.log

Dies ist mein package.json

{ 
    "name": "electron-quick-start", 
    "version": "1.0.0", 
    "description": "A minimal Electron application", 
    "main": "main.js", 
    "scripts": { 
    "start": "electron .", 
    "watch": "watchify app/app.js -t babelify -o public/js/bundle.js --debug --verbose" 
    }, 
    "repository": { 
    "type": "git", 
    "url": "git+https://github.com/electron/electron-quick-start.git" 
    }, 
    "keywords": [ 
    "Electron", 
    "quick", 
    "start", 
    "tutorial" 
    ], 
    "author": "GitHub", 
    "license": "CC0-1.0", 
    "bugs": { 
    "url": "https://github.com/electron/electron-quick-start/issues" 
    }, 
    "homepage": "https://github.com/electron/electron-quick-start#readme", 
    "devDependencies": { 
    "babelify": "^7.3.0", 
    "browserify": "^13.0.1", 
    "electron-prebuilt": "^1.2.0" 
    }, 
    "dependencies": { 
    "axios": "^0.13.1", 
    "babel": "^6.5.2", 
    "babel-core": "^6.10.4", 
    "babel-preset-es2015": "^6.9.0", 
    "babel-preset-react": "^6.11.1", 
    "babelify": "^7.3.0", 
    "browserify": "^13.0.1", 
    "classnames": "^2.2.5", 
    "electron-prebuilt": "^1.2.7", 
    "electron-reload": "^1.0.0", 
    "jquery": "^3.1.0", 
    "react": "^15.2.1", 
    "react-autocomplete": "^1.0.1", 
    "react-dom": "^15.2.1", 
    "react-sound": "^0.5.0", 
    "soundmanager2": "^2.97.20150601-a" 
    } 
} 

Von dem, was ich im Tutorial browserify gelesen haben soll, mit watchify als auch kommen, aber wenn Ich habe es als ein separates Modul installiert es funktioniert aber dann habe ich den folgenden Fehler:

console.error("SyntaxError: C:/Users/Alejandro/Documents/Proyectos/music-player/app/app.js: Unexpected token (12:10) while parsing file: C:\Users\Alejandro\Documents\Proyectos\music-player\app\app.js");

Antwort

0

Ich habe das gleiche Tutorial verwendet, aber ich konnte nicht alles durch die Anwendung der Code-Schnipsel aus dem Tutorial arbeiten.

Tun Sie dies statt:

  • installieren sowohl browserify und watchify:

    npm installieren -g browserify watchify

  • Klon der Musik-Player Github-Repository des Autors statt Elektronen-Schnellstart . Fügen Sie dann die Code-Schnipsel des Lernprogramms hinzu oder ändern Sie sie.

+0

Danke, ich werde es versuchen –