Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load custom layers (Module not found) #41

Open
50l3r opened this issue Jun 22, 2020 · 0 comments
Open

Can't load custom layers (Module not found) #41

50l3r opened this issue Jun 22, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@50l3r
Copy link

50l3r commented Jun 22, 2020

I recieved an error when i try to require my custom layers:

`ERROR in ./src/maras/reviews.ts
Module not found: Error: Can't resolve '/opt/nodejs/utils' in 'D:\Git\gestios\gestios-lambda\src\maras'
@ ./src/maras/reviews.ts 13:14-42

ERROR in ./src/maras/reviews.ts
Module not found: Error: Can't resolve 'gestios-sdk-js' in 'D:\Git\gestios\gestios-lambda\src\maras'
@ ./src/maras/reviews.ts 12:16-41

ERROR in D:\Git\gestios\gestios-lambda\src\maras\reviews.ts
./src/maras/reviews.ts
[tsl] ERROR in D:\Git\gestios\gestios-lambda\src\maras\reviews.ts(1,17)
TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try npm i @types/node.

ERROR in D:\Git\gestios\gestios-lambda\src\maras\reviews.ts
./src/maras/reviews.ts
[tsl] ERROR in D:\Git\gestios\gestios-lambda\src\maras\reviews.ts(2,15)
TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try npm i @types/node.`

Thats the code:

const GestiOS = require('gestios-sdk-js');
const utils = require('/opt/nodejs/utils');

let response;

export interface Event {
	name: string;
}

export default async (event: Event): Promise<string> => (
	`Hello ${event.name}`
);
@50l3r 50l3r changed the title cannot find module Can't load custom layers (Module not found) Jun 22, 2020
@buggy buggy added the enhancement New feature or request label Apr 24, 2021
baxneo added a commit to baxneo/aws-sam-webpack-plugin that referenced this issue Aug 21, 2021
baxneo added a commit to baxneo/aws-sam-webpack-plugin that referenced this issue Aug 21, 2021
StackToolbox#41 Add Layers support by `makefile` build method
baxneo added a commit to baxneo/aws-sam-webpack-plugin that referenced this issue Aug 22, 2021
baxneo added a commit to baxneo/aws-sam-webpack-plugin that referenced this issue Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants