Unable to get empty bot to run
ahacme opened this issue · comments
Getting this error for empty bot or conversation learner UI
node ./lib/ui.js
module.js:549
throw err;
^
Error: Cannot find module 'fetch-ponyfill'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at getFetch (C:\Users\mahasan\cl-bot-01\node_modules\ms-rest-js\dist\lib\util\utils.js:58:12)
at Object. (C:\Users\mahasan\cl-bot-01\node_modules\ms-rest-js\dist\lib\util\utils.js:64:19)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
Did you run npm install
?
There was similar complaints about this error over here:
#197
Although I haven't been able to re-produce and would need more context to understand why.
I will try to get an issue template in here so people know to add OS, node, npm versions etc.
Just to bring over context from other PR.
Based on the info there npm install
and npm run build
with both npm 5.x and npm 6.x apparently succeed, but somehow only when installing with 6 does that package actually get included.
I would need to test more to verify, but I think longer term solution is to find a way to update our builds to run the sample instead of only building it.
I had this too. The first time I ran npm install
it errored out with gyp ERR! stack Error: Can't find Python executable
as described in the readme, so it looks like it didn't install all modules. Running npm install
again seems to have fixed it.
Glad you were able to run the sample.
@mattmazzola, I am seeing the same error Cannot find module 'fetch-ponyfill'
but only on my CI build.
VSTS reports that it is using npm 5.6.0. I am running 6.1.0 locally.
When I peek at node_modules locally, fetch-ponyfill is there, but it is missing from my build artifact. When I enable verbose logging on the npm install
task, the only occurrence of fetch-ponyfill is here:
2018-09-05T18:54:46.0532633Z npm info lifecycle fetch-ponyfill@4.1.0~prepack: fetch-ponyfill@4.1.0
2018-09-05T18:54:46.0532841Z npm info lifecycle fetch-ponyfill@4.1.0~postpack: fetch-ponyfill@4.1.0
Could this be an issue with npm version mismatch between dev and build hosts?
Relevant parts of package.json look like this
{
"ms-rest-js": {
"version": "0.2.8",
"resolved": "http://registry.npmjs.org/ms-rest-js/-/ms-rest-js-0.2.8.tgz",
"integrity": "sha512-KgiSsbJzKcPLx0Zaca5PEdGOwm8X4Np+aTukK6stMl2eAqSrHvncjteyeXi6v6O0ECLYeUWVbqcPJfpw1PjnZQ==",
"requires": {
"@types/form-data": "^2.2.1",
"@types/is-stream": "^1.1.0",
"@types/node": "^9.4.6",
"@types/node-fetch": "^1.6.7",
"@types/uuid": "^3.4.3",
"fetch-cookie": "^0.7.0",
"fetch-ponyfill": "github:amarzavery/fetch-ponyfill#136e6f8192bdb2aa0b7983f0b3b4361c357be9db",
"form-data": "^2.3.2",
"is-buffer": "^2.0.0",
"is-stream": "^1.1.0",
"moment": "^2.21.0",
"url-parse": "^1.2.0",
"uuid": "^3.2.1"
},
"dependencies": {
"@types/node": {
"version": "9.6.31",
"resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.31.tgz",
"integrity": "sha512-kIVlvUBizL51ALNMPbmcZoM7quHyB7J6fLRwQe22JsMp39nrVSHdBeVVS3fnQCK1orxI3O8LScmb8cuiihkAfA=="
}
},
"fetch-ponyfill": {
"version": "github:amarzavery/fetch-ponyfill#136e6f8192bdb2aa0b7983f0b3b4361c357be9db",
"from": "github:amarzavery/fetch-ponyfill#master",
"requires": {
"fetch-cookie": "~0.6.0",
"node-fetch": "~1.7.1"
},
"dependencies": {
"fetch-cookie": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-0.6.0.tgz",
"integrity": "sha1-T+xOQIzAAH9sBOVTYYr0s97jf2k=",
"requires": {
"es6-denodeify": "^0.1.1",
"tough-cookie": "^2.3.1"
}
}
}
}
}
}
Edit to add: I am running a Bot Framework v4 preview bot, and I'm not sure how much overlap, if any, there is with this repo, but the error looks suspiciously similar.