After upgrade to 2.0: ServerlessError: ReferenceError: index is not defined
See original GitHub issueThis is a:
- [] Feature request or change
- Bug report
For bug reports:
Expected behavior
Running serverless client deploy
my static site should be deployed to S3ˀ
Actual behavior
After upgrade to 2.0 I get the following error when running SLS_DEBUG=true serverless client deploy
:
ServerlessError: ReferenceError: index is not defined
at _validateConfig.then.then.catch.error (/Users/warrick/dev/orchestrated/people-mapper-ui/node_modules/serverless-finch/index.js:223:33)
From previous event:
at Client._processDeployment (/Users/warrick/dev/orchestrated/people-mapper-ui/node_modules/serverless-finch/index.js:222:13)
at Object.client:deploy:deploy [as hook] (/Users/warrick/dev/orchestrated/people-mapper-ui/node_modules/serverless-finch/index.js:45:14)
at BbPromise.reduce (/Users/warrick/dev/orchestrated/people-mapper-ui/node_modules/serverless/lib/classes/PluginManager.js:372:55)
From previous event:
at PluginManager.invoke (/Users/warrick/dev/orchestrated/people-mapper-ui/node_modules/serverless/lib/classes/PluginManager.js:372:22)
at PluginManager.run (/Users/warrick/dev/orchestrated/people-mapper-ui/node_modules/serverless/lib/classes/PluginManager.js:403:17)
at variables.populateService.then (/Users/warrick/dev/orchestrated/people-mapper-ui/node_modules/serverless/lib/Serverless.js:102:33)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
at Serverless.run (/Users/warrick/dev/orchestrated/people-mapper-ui/node_modules/serverless/lib/Serverless.js:89:74)
at serverless.init.then (/Users/warrick/dev/orchestrated/people-mapper-ui/node_modules/serverless/bin/serverless:42:50)
Steps to reproduce
- Upgrade to 2.0
- include WebsiteConfiguration with IndexDocument or ErrorDocument or both
- run serverless client deploy
-
Operating system: Mac OSX
-
serverless-finch version: 2.0
-
serverless.yml
that produces bug: Any serverless yml with WebsiteConfiguration IndexDocument and ErrorDocument will produce this error. -
Command that produces bug: serverless client deploy
-
Other details: This error is reported immediately after an upgrade to serverless-finch 2.0. See lines 127 and 128 in index.js: indexDoc = this.options.indexDocument || index.html; errorDoc = this.options.errorDocument || error.html;
I think the default values should be explicit strings to fix this issue.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
ReferenceError: index is not defined - javascript - Stack Overflow
I have to use a JS file in my TS project. This JS file was not made by me but I have to...
Read more >Console throws "Require is not defined" err when loading sls ...
When my index.html tries to load the bundle with a tag, the browser's console logs the following error: lambda.js:4 Uncaught ReferenceError: ...
Read more >'ReferenceError: contents is not defined' with U1db - Ask Ubuntu
Your problem is not with U1DB, but with the OptionSelector. Let's consider a simpler example: import QtQuick 2.0 import Ubuntu.
Read more >NodeJs: ReferenceError: fetch is not defined - Brian Cline
NodeJs: ReferenceError: fetch is not defined ... To install it, I simply need to type the following command into the terminal.
Read more >How to fix "Uncaught ReferenceError: x is not defined" in ...
JS Casts 04 - How to fix "Uncaught TypeError: x is not a function " in JavaScript.Visit https://javascriptcasts.com/episodes/04 for a summary ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wzedi I see you’ve put a PR in for this in #49 without me even having to ask! 😀 Thanks! This was indeed something we postponed so we could get out a v2 release with all the refactoring. I’m waiting for a merge from a collaborator and then will cut a new minor release to get this to you.
If it will stall is it possible to provide a CLI switch to disable prompts for automated deployments?