2017-05-04 4 views
0

Vielen Dank für Ihren Besuch und Antworten. Hintergrund Beschreibung: Kürzlich machte ich die Amazon-Website "AVS" und jetzt weiter mit Schritt 5.8-5.9. AVS 的 API 链接 地址: https://github.com/alexa/alexa-avs-sample-app/wiki/Windows#6---run-the-sample-appAVS- "npm start" -Produkte Fehler

Als ich „npm start“ ausgeführt, was darauf hindeutet, dass das Produkt Fehler, gibt es einige andere Fehler, natürlich, nicht meine Positionierung nicht falsch falsch auszuschließen, bitte helfen bei der Suche falsch vorgeschlagen. Im Folgenden wird eine Fehlermeldung:

*LvandeMacBook-Pro:companionService lvan$ npm start 
> [email protected] start /Users/lvan/Documents/amazon/alexa-avs-sample-app/samples/companionService 
> node ./bin/www 
This node service needs to be running to store token information memory and vend them for the AVS app. 
/Users/lvan/Documents/amazon/alexa-avs-sample-app/samples/companionService/config.js:27 
     “amzn1.application.6f4d5046ead64b188c95a8d3a0567741”: [“123456”], 
     ^
SyntaxError: Invalid or unexpected token 
    at createScript (vm.js:56:10) 
    at Object.runInThisContext (vm.js:97:10) 
    at Module._compile (module.js:542:28) 
    at Object.Module._extensions..js (module.js:579:10) 
    at Module.load (module.js:487:32) 
    at tryModuleLoad (module.js:446:12) 
    at Function.Module._load (module.js:438:3) 
    at Module.require (module.js:497:17) 
    at require (internal/module.js:20:19) 
    at Object.<anonymous> (/Users/lvan/Documents/amazon/alexa-avs-sample-app/samples/companionService/authentication.js:4:14) 
npm ERR! Darwin 16.5.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 
npm ERR! node v6.10.2 
npm ERR! npm v3.10.10 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] start: `node ./bin/www` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] start script 'node ./bin/www'. 
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 alexa-voice-service-sample-companion-service package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node ./bin/www 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs alexa-voice-service-sample-companion-service 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls alexa-voice-service-sample-companion-service 
npm ERR! There is likely additional logging output above. 
npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/lvan/Documents/amazon/alexa-avs-sample-app/samples/companionService/npm-debug.log 
LvandeMacBook-Pro:companionService lvan$* 

Darüber hinaus fügen Sie zwei mögliche Erklärungs Dateien "npm Liste" und "config.js" wie folgt:

LvandeMacBook-Pro:companionService lvan$ npm list 
[email protected] /Users/lvan/Documents/amazon/alexa-avs-sample-app/samples/companionService 
├─┬ [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ └─┬ [email protected] 
│ ├── [email protected] 
│ └─┬ [email protected] 
│  └── [email protected] 
├─┬ [email protected] 
│ └── [email protected] 
├─┬ [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ └── [email protected] 
├─┬ [email protected] 
│ ├── [email protected] 
│ └─┬ [email protected] 
│ └── [email protected] 
└── [email protected] 

config.js

/** 
* @module 
* This module defines the settings that need to be configured for a new 
* environment. 
* The clientId and clientSecret are provided when you create 
* a new security profile in Login with Amazon. 
* 
* You will also need to specify 
* the redirect url under allowed settings as the return url that LWA 
* will call back to with the authorization code. The authresponse endpoint 
* is setup in app.js, and should not be changed. 
* 
* lwaRedirectHost and lwaApiHost are setup for login with Amazon, and you should 
* not need to modify those elements. 
*/ 
var config = { 
    clientId: 'amzn1.application-oa2-client.d2be48eb59494####5fb004d8701', 
    clientSecret: 'f830ccf171b61d15bbd5f#######efe2695eaec26e897a59ab6', 
    redirectUrl: 'https://localhost:3000/authresponse', 
    lwaRedirectHost: 'amazon.com', 
    lwaApiHost: 'api.amazon.com', 
    validateCertChain: true, 
    sslKey: '/Users/lvan/Documents/amazon/alexa-avs-sample-app/samples/javaclient/certs/server/node.key', 
    sslCert: '/Users/lvan/Documents/amazon/alexa-avs-sample-app/samples/javaclient/certs/server/node.crt', 
    sslCaCert: '/Users/lvan/Documents/amazon/alexa-avs-sample-app/samples/javaclient/certs/ca/ca.crt', 
    products: { 
     “amzn1.application.6f4d5046#####95a8d3a0567741”: [“123456”], 
    }, 
}; 


module.exports = config; 

nochmals vielen Dank für Ihren Besuch und antwortet

Antwort

0

Diese Frage wurde gelöst, das Problem mit dem Symbol