Skip to content

Fix uuid error: "uuid is not a function"#10

Open
guilhermelirio wants to merge 1 commit into
alexa-samples:masterfrom
guilhermelirio:patch-1
Open

Fix uuid error: "uuid is not a function"#10
guilhermelirio wants to merge 1 commit into
alexa-samples:masterfrom
guilhermelirio:patch-1

Conversation

@guilhermelirio
Copy link
Copy Markdown

Change line 16 of AlexaResponse.js:
let uuid = require('uuid');

To:
let uuid = require('uuid/v4');

Change line 16 of AlexaResponse.js:
let uuid = require('uuid');

To:
let uuid = require('uuid/v4');
@shun-dgut
Copy link
Copy Markdown

After modifying the code, this problem occurred, can you help me see it?

{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module 'uuid/v4'",
"trace": [
"Runtime.ImportModuleError: Error: Cannot find module 'uuid/v4'",
" at _loadUserApp (/var/runtime/UserFunction.js:100:13)",
" at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)",
" at Object. (/var/runtime/index.js:45:30)",
" at Module._compile (internal/modules/cjs/loader.js:778:30)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)",
" at Module.load (internal/modules/cjs/loader.js:653:32)",
" at tryModuleLoad (internal/modules/cjs/loader.js:593:12)",
" at Function.Module._load (internal/modules/cjs/loader.js:585:3)",
" at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)",
" at startup (internal/bootstrap/node.js:283:19)"
]
}

@guilhermelirio
Copy link
Copy Markdown
Author

guilhermelirio commented Jul 21, 2020

Open your package.json and verify the version of uuid package. Change to "7.0.2" and test.

@shun-dgut
Copy link
Copy Markdown

Open your package.json and verify the version of uuid package. Change to "7.0.2" and test.
The problem has been solved. Thank you

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