Skip to content

[make] Make NPX installable#9

Open
jeroenev wants to merge 2 commits into
rigwild:mainfrom
jeroenev:make_npx_installable
Open

[make] Make NPX installable#9
jeroenev wants to merge 2 commits into
rigwild:mainfrom
jeroenev:make_npx_installable

Conversation

@jeroenev
Copy link
Copy Markdown

No description provided.

Comment thread package.json Outdated
Co-authored-by: Tom Plant <tom@tplant.com.au>
Comment thread src/cart.ts
// Export only the `#sc-active-cart` content to a mock file
const timestamp = getTimestamp()
const mockPath = `${__dirname}/../mocks/getCartContent_${timestamp}.html`
const mockPath = path.join(PACKAGE_ROOT, 'mocks', `getCartContent_${timestamp}.html`)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mocks doesn't exist when I installed with npx, so this throws. maybe EXPORT_LIVE_SCRAPING_FOR_MOCKS should be disabled by default

[ERROR][get-cart-content] Error in get-cart-content tool: Error: ENOENT: no such file or directory, open '/home/nanobot/.npm/_npx/91ea6e9f96498d68/node_modules/mcp-server-amazon/mocks/getCartContent_2026-04-03_02-54-11.html'
    at Object.writeFileSync (node:fs:2398:20)
    at getCartContent (file:///home/nanobot/.npm/_npx/91ea6e9f96498d68/node_modules/mcp-server-amazon/build/cart.js:38:20)
    at async file:///home/nanobot/.npm/_npx/91ea6e9f96498d68/node_modules/mcp-server-amazon/build/index.js:51:23
    at async McpServer.executeToolHandler (file:///home/nanobot/.npm/_npx/91ea6e9f96498d68/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:233:20)
    at async file:///home/nanobot/.npm/_npx/91ea6e9f96498d68/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:32
    at async wrappedHandler (file:///home/nanobot/.npm/_npx/91ea6e9f96498d68/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:125:32) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/nanobot/.npm/_npx/91ea6e9f96498d68/node_modules/mcp-server-amazon/mocks/getCartContent_2026-04-03_02-54-11.html'
}

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