Our pipeline is throwing errors at a certain step. But running the same command in local works. Not sure what is happening. Any help is deeply appreciated.
Pipeline output:
+ npm run test
> makehttprequest@1.0.0 test /opt/atlassian/pipelines/agent/build/lambda_functions/makeHttpRequest
> npx cross-env NODE_ENV=dev nyc --reporter=html --reporter=text mocha --timeout 15000 --exit
npx: installed 7 in 1.561s
....
39 passing (2s)
11 pending
2 failing
1) makeHttpRequest
makeHttpRequest HTTP Post Learner:
Error: Error: Cannot find module 'jsforce'
at Object.exports.handler (index.js:3:1129)
at process._tickCallback (internal/process/next_tick.js:68:7)
2) makeHttpRequest
makeHttpRequest HTTP Get Learner response:
Error: Error: Cannot find module 'jsforce'
at Object.exports.handler (index.js:3:1129)
at process._tickCallback (internal/process/next_tick.js:68:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! makehttprequest@1.0.0 test: `npx cross-env NODE_ENV=dev nyc --reporter=html --reporter=text mocha --timeout 15000 --exit`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the makehttprequest@1.0.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-04-08T13_46_10_145Z-debug.log
Package.json:
{
}
bitbucket-pipelines.yml:
Hi @rbehera .
Please check that your package.json with `jsforce` in the folder `/lambda_functions/makeHttpRequest`
When you do `npm i` npm tries to find package.json in the folder where you are.
Previously you did `cd ./lambda_functions/makeHttpRequest`
Maybe this is the problem.
Cheers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.