Pål Brattberg
03/07/2022, 2:52 PMstart
with the latest version. It shows up when I update an existing lambda while running:
Functions: Building . src/get.main...
Functions: Done building . src/get.main (30ms)
Oops! Something went wrong! :(
ESLint: 8.10.0
Error: Failed to load plugin '@typescript-eslint' declared in 'package.json » eslint-config-serverless-stack': Cannot find module 'typescript'
Require stack:
- /Users/pal/temp/rest-api/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js
- /Users/pal/temp/rest-api/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js
- /Users/pal/temp/rest-api/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js
- /Users/pal/temp/rest-api/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js
- /Users/pal/temp/rest-api/node_modules/@typescript-eslint/eslint-plugin/dist/index.js
- /Users/pal/temp/rest-api/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
Referenced from: /Users/pal/temp/rest-api/node_modules/eslint-config-serverless-stack/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (/Users/pal/temp/rest-api/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/Users/pal/temp/rest-api/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js:27:25)
at Module._compile (/Users/pal/temp/rest-api/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
This was just reproduced by using examples/rest-api
and upgrading to 0.67.0
.Dominik Dabrowski
03/07/2022, 4:30 PMNo stacks found for app my-sst-app and stage local
when hitting the console and this error when trying to hit my lambda with a GET:
in browser: {"message":"Internal Server Error"}
in local terminal: {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Runtime.HandlerNotFound: /Users/doda/pr/sst-test/my-sst-app/.sst/artifacts/admin-my-sst-app-my-stack-Api-Lambda_GET_-/src/lambda.handler is undefined or not exported" ...
Frank
Dominik Dabrowski
03/07/2022, 7:49 PMnpx create-serverless-stack@latest my-sst-app
on node v14.8.0 and npm v6.14.7Frank
It seems it’s trying to connect toCopy codeNo stacks found for app my-sst-app and stage local
local
stage. But in the terminal error message
It’s using theCopy code... admin-my-sst-app-my-stack-Api-Lambda_GET_-/src/lambda.handler is undefined or not exported" ...
admin
stage.Frank
npx create-serverless-stack@latest my-sst-app
?Dominik Dabrowski
03/07/2022, 8:07 PMnpm run start
and confirmed the default value there admin
Frank
Dominik Dabrowski
03/07/2022, 8:09 PM<http://console.serverless-stack.com/my-sst-app/local|console.serverless-stack.com/my-sst-app/local>
Dominik Dabrowski
03/07/2022, 8:09 PMDominik Dabrowski
03/07/2022, 8:12 PMDominik Dabrowski
03/07/2022, 8:13 PMtypescript
import error when modifying the lambda locallyDominik Dabrowski
03/07/2022, 8:18 PMFrank
Frank
Dominik Dabrowski
03/07/2022, 8:29 PMFrank
Frank
Cannot find module 'typescript'
error? https://gist.github.com/doda/5b567c2d3b744f3175c8e8fbad64c200Frank
thdxr
03/08/2022, 1:43 AMFrank
Frank
eslint-config-serverless-stack
is looking for typescript
.Frank
typescript
as a devDependency fixes it. But it doesn’t make sense for JS projects to do that right?thdxr
03/08/2022, 1:57 AMthdxr
03/08/2022, 1:58 AMthdxr
03/08/2022, 1:58 AMFrank
Frank
Pål Brattberg
03/08/2022, 12:22 PMPål Brattberg
03/08/2022, 4:35 PMOops! Something went wrong! :(
ESLint: 8.10.0
ESLint couldn't find the plugin "@typescript-eslint/eslint-plugin".
(The package "@typescript-eslint/eslint-plugin" was not found when loaded as a Node module from the directory "/Users/pal/dev/xyz".)
It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
npm install @typescript-eslint/eslint-plugin@latest --save-dev
The plugin "@typescript-eslint/eslint-plugin" was referenced from the config file in "package.json » eslint-config-serverless-stack".
If you still can't figure out the problem, please stop by <https://eslint.org/chat/help> to chat with the team.
Frank
Dominik Dabrowski
03/11/2022, 4:28 AMGET
to the endpoint:
==========================
Starting Live Lambda Dev
==========================
SST Console: <https://console.serverless-stack.com/my-sst-app3/admin/local>
Debug session started. Listening for requests...
80afde6a-5547-43e9-934a-b2f4f307e798 REQUEST admin-my-sst-app3-my-stack-ApiLambdaGETB1714EF3-gesgHZsoJzY0 [src/lambda.handler] invoked by API GET /
Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Runtime.HandlerNotFound: /Users/doda/pr/sst-test/my-sst-app3/.sst/artifacts/admin-my-sst-app3-my-stack-Api-Lambda_GET_-/src/lambda.handler is undefined or not exported","reason":"Runtime.HandlerNotFound: /Users/doda/pr/sst-test/my-sst-app3/.sst/artifacts/admin-my-sst-app3-my-stack-Api-Lambda_GET_-/src/lambda.handler is undefined or not exported","promise":{},"stack":["Runtime.UnhandledPromiseRejection: Runtime.HandlerNotFound: /Users/doda/pr/sst-test/my-sst-app3/.sst/artifacts/admin-my-sst-app3-my-stack-Api-Lambda_GET_-/src/lambda.handler is undefined or not exported"," at process.<anonymous> (file:///Users/doda/pr/sst-test/my-sst-app3/node_modules/@serverless-stack/aws-lambda-ric/lib/index.js:34:23)"," at process.emit (events.js:314:20)"," at processPromiseRejections (internal/process/promises.js:245:33)"," at processTicksAndRejections (internal/process/task_queues.js:94:32)"]}
Dominik Dabrowski
03/11/2022, 4:29 AMWARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.
You may find that it works just fine, or you may not.
SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <4.5.0
YOUR TYPESCRIPT VERSION: 4.6.2
Pål Brattberg
03/11/2022, 9:28 AMJay
Pål Brattberg
03/15/2022, 11:33 PMsst start
Frank
npm install @typescript-eslint/eslint-plugin@latest --save-dev
Frank
/Users/doda/pr/sst-test/my-sst-app3/.sst/artifacts/admin-my-sst-app3-my-stack-Api-Lambda_GET_-/src/lambda.js
Pål Brattberg
03/17/2022, 8:37 AMFunctions: Building . src/sites/list.handler...
Functions: Done building . src/sites/list.handler (62ms)
=============
WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.
You may find that it works just fine, or you may not.
SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <4.5.0
YOUR TYPESCRIPT VERSION: 4.6.2
Please only submit bug reports when using the officially supported version.
=============