Build missing webpack files?
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
## Accessing Sagemaker Space
I had been trying to access a sagemaker space using the toolkit but was repeatedly seeing an localhost error message and it failed to start the session.
scratch: Error: Cannot find module '../../../../331.js'
Require stack:
-
amazonwebservices.aws-toolkit-vscode-3.71.0\dist\src\awsService\sagemaker\detached-server\server.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1408:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1064:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1069:22)
at Module._load (node:internal/modules/cjs/loader:1218:37)
at c._load (node:electron/js2c/node_init:2:18013)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:242:24)
at Module.require (node:internal/modules/cjs/loader:1494:12)
at require (node:internal/modules/helpers:135:16)
at Y.f.require (.vscode\extensions\amazonwebservices.aws-toolkit-vscode-3.71.0\dist\src\awsService\sagemaker\detached-server\server.js:7:32928) {
code: 'MODULE_NOT_FOUND',
## Suspected Issue
I took a look at the dist file in the .vsix and I cannot find a 331.js file from the webpack bundle.
But If I rebuild the package from source in the packages folder I see:
amazonq/
toolkit/
core/
If I go into core/dist files that is where I find the 331.js file but again its not in the toolkit dist. If I copy all the files from core/dist into the vsix dist folder then the expected behavior works and I can load a space from vscode. Is the build somehow skipping some needed dependency files.
## Steps to reproduce the issue
## Expected behavior
Open my code editor space with vscode
## System details (run `AWS: About` and/or `Amazon Q: About`)
- OS: Windows 11
- Visual Studio Code version:
- AWS Toolkit version: 3.71.0
- Amazon Q version:
Contributor guide
Research direction
Start by comparing the toolkit dist contents in the .vsix with packages/core/dist, focusing on the missing 331.js dependency referenced by awsService/sagemaker/detached-server/server.js. Trace the package build from the packages folder and determine why core output is absent from the toolkit bundle. Done means a packaged VSIX includes the required files and connecting to a SageMaker space opens the VS Code editor without the MODULE_NOT_FOUND error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript, vscode, webpack
- Domain
- build-system, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100