Skip to content

Commit 5507448

Browse files
fix: Remove publish scripts from dist/package.json
The dist/package.json was including the 'publish' and 'publish:npm' scripts from the root package.json, which referenced './publish.sh' that doesn't exist in the dist/ directory. This caused npm publish to fail. This fix removes those scripts from the distribution package.json so npm publish works correctly. ✅ Fixes './publish.sh: not found' error 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent ddaef3a commit 5507448

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

mcp-package/build.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ packageContent.bin = {
158158

159159
// Update files list to include only what's in dist
160160
packageContent.files = ['*.js', '*.json', '*.md'];
161+
162+
// Remove scripts that don't apply to the distributed package
163+
delete packageContent.scripts.publish;
164+
delete packageContent.scripts['publish:npm'];
165+
161166
writeFileSync(join(distDir, 'package.json'), JSON.stringify(packageContent, null, 2));
162167
console.log('✓ Created package.json in dist/');
163168

mcp-package/dist/package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@drupaltools/mcp",
3-
"version": "1.0.0",
3+
"version": "1.0.3",
44
"description": "Model Context Protocol (MCP) server for discovering Drupal development tools, utilities, and plugins",
55
"type": "module",
66
"main": "index.js",
@@ -14,10 +14,7 @@
1414
],
1515
"scripts": {
1616
"build": "node build.js",
17-
"prepublishOnly": "npm run build",
18-
"test": "node dist/test.js",
19-
"publish:npm": "cd dist && npm publish",
20-
"publish": "./publish.sh"
17+
"test": "node dist/test.js"
2118
},
2219
"keywords": [
2320
"mcp",

0 commit comments

Comments
 (0)