Pipeline install NPM from Github (or private Bitbucket) fails no package.json found
Asked by Frederik Mann:

Greetings I am trying to install a npm package from a public github repo but it fails.

```
image: atlassian/default-image:3

pipelines:
default:
- parallel:
- step:
name: 'ApexDocs Test'
script:
- t=$(pwd)/docs
- s=$(pwd)/force-app/main/default/classes
- npm i @cparra/apexdocs <--- If I use this it WORKS FINE
- npm i git+https://github.com/cesarParra/apexdocs.git#1.x <--- If I use this it DOES NOT WORK
- $(npm bin)/apexdocs-generate -s $s -t $t --group false 
artifacts:
- docs/index.md
```

The following command runs complettly fine on my local machine but not in the pipeline.

    npm install git+ssh://git@bitbucket.org:companyname/apexdocs.git#1.x-fork -verbose

The project is not an npm project and I just want to run the binary "apexdocs-generate" from the npm package.  

The error:

    npm verb stack Error: ENOENT: no such file or directory, chmod '/opt/atlassian/pipelines/agent/build/node_modules/@companyname/apexdocs/lib/cli/generate.js'

<br />

<br />

The error log:  

    #npm install git+ssh://git@bitbucket.org:companyname/apexdocs.git#1.x-fork -verbose

    npm http fetch GET 200 https://registry.npmjs.org/ansi-regex 17ms

    npm http fetch GET 200 https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz 5ms (from cache)

    npm http fetch GET 200 https://registry.npmjs.org/ansi-styles 16ms

    npm http fetch GET 200 https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz 4ms (from cache)

    npm http fetch GET 200 https://registry.npmjs.org/color-convert 28ms

    npm http fetch GET 200 https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz 4ms (from cache)

    npm http fetch GET 200 https://registry.npmjs.org/color-name 26ms

    npm http fetch GET 200 https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz 4ms (from cache)

    npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 1250ms

    npm timing stage:loadIdealTree Completed in 1266ms

    npm timing stage:generateActionsToTake Completed in 8ms

    npm verb correctMkdir /root/.npm/_locks correctMkdir not in flight; initializing

    npm verb lock using /root/.npm/_locks/staging-b0c3db9be40af2cb.lock for /opt/atlassian/pipelines/agent/build/node_modules/.staging

    npm timing audit submit Completed in 125ms

    npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 125ms

    npm timing audit body Completed in 1ms

    npm timing action:extract Completed in 134ms

    npm timing action:finalize Completed in 16ms

    npm timing action:refresh-package-json Completed in 51ms

    npm info lifecycle ansi-regex@5.0.1~preinstall: ansi-regex@5.0.1

    npm info lifecycle color-name@1.1.4~preinstall: color-name@1.1.4

    npm info lifecycle color-convert@2.0.1~preinstall: color-convert@2.0.1

    npm info lifecycle ansi-styles@4.3.0~preinstall: ansi-styles@4.3.0

    npm info lifecycle emoji-regex@8.0.0~preinstall: emoji-regex@8.0.0

    npm info lifecycle escalade@3.1.1~preinstall: escalade@3.1.1

    npm info lifecycle get-caller-file@2.0.5~preinstall: get-caller-file@2.0.5

    npm info lifecycle is-fullwidth-code-point@3.0.0~preinstall: is-fullwidth-code-point@3.0.0

    npm info lifecycle require-directory@2.1.1~preinstall: require-directory@2.1.1

    npm info lifecycle strip-ansi@6.0.1~preinstall: strip-ansi@6.0.1

    npm info lifecycle string-width@4.2.3~preinstall: string-width@4.2.3

    npm info lifecycle strnum@1.0.5~preinstall: strnum@1.0.5

    npm info lifecycle utf8-byte-length@1.0.4~preinstall: utf8-byte-length@1.0.4

    npm info lifecycle truncate-utf8-bytes@1.0.2~preinstall: truncate-utf8-bytes@1.0.2

    npm info lifecycle wrap-ansi@7.0.0~preinstall: wrap-ansi@7.0.0

    npm info lifecycle cliui@7.0.4~preinstall: cliui@7.0.4

    npm info lifecycle y18n@5.0.8~preinstall: y18n@5.0.8

    npm info lifecycle yargs-parser@20.2.9~preinstall: yargs-parser@20.2.9

    npm info lifecycle fast-xml-parser@4.0.0-beta.8~preinstall: fast-xml-parser@4.0.0-beta.8

    npm info lifecycle html-entities@2.3.2~preinstall: html-entities@2.3.2

    npm info lifecycle markdown-table-ts@1.0.3~preinstall: markdown-table-ts@1.0.3

    npm info lifecycle sanitize-filename-ts@1.0.2~preinstall: sanitize-filename-ts@1.0.2

    npm info lifecycle yargs@16.2.0~preinstall: yargs@16.2.0

    npm info lifecycle @@companyname/apexdocs@1.13.7~preinstall: @companyname/apexdocs@1.13.

    npm timing action:preinstall Completed in 4ms

    npm info linkStuff ansi-regex@5.0.1

    npm info linkStuff color-name@1.1.4

    npm info linkStuff color-convert@2.0.1

    npm info linkStuff ansi-styles@4.3.0

    npm info linkStuff emoji-regex@8.0.0

    npm info linkStuff escalade@3.1.1

    npm info linkStuff get-caller-file@2.0.5

    npm info linkStuff is-fullwidth-code-point@3.0.0

    npm info linkStuff require-directory@2.1.1

    npm info linkStuff strip-ansi@6.0.1

    npm info linkStuff string-width@4.2.3

    npm info linkStuff strnum@1.0.5

    npm info linkStuff utf8-byte-length@1.0.4

    npm info linkStuff truncate-utf8-bytes@1.0.2

    npm info linkStuff wrap-ansi@7.0.0

    npm info linkStuff cliui@7.0.4

    npm info linkStuff y18n@5.0.8

    npm info linkStuff yargs-parser@20.2.9

    npm info linkStuff fast-xml-parser@4.0.0-beta.8

    npm verb linkBins [

    npm verb linkBins   { fxparser: 'src/cli/cli.js' },

    npm verb linkBins   '/opt/atlassian/pipelines/agent/build/node_modules/.bin',

    npm verb linkBins   false

    npm verb linkBins ]

    npm info linkStuff html-entities@2.3.2

    npm info linkStuff markdown-table-ts@1.0.3

    npm info linkStuff sanitize-filename-ts@1.0.2

    npm info linkStuff yargs@16.2.0

    npm info linkStuff @companyname/apexdocs@1.13.7

    npm verb linkBins [

    npm verb linkBins   { 'apexdocs-generate': 'lib/cli/generate.js' },

    npm verb linkBins   '/opt/atlassian/pipelines/agent/build/node_modules/.bin',

    npm verb linkBins   false

    npm verb linkBins ]

    npm timing action:build Completed in 12ms

    npm verb unlock done using /root/.npm/_locks/staging-b0c3db9be40af2cb.lock for /opt/atlassian/pipelines/agent/build/node_modules/.staging

    npm timing stage:rollbackFailedOptional Completed in 28ms

    npm timing stage:runTopLevelLifecycles Completed in 12924ms

    npm WARN enoent ENOENT: no such file or directory, open '/opt/atlassian/pipelines/agent/build/package.json'

    npm verb enoent This is related to npm not being able to find a file.

    npm verb enoent 

    npm WARN build No description

    npm WARN build No repository field.

    npm WARN build No README data

    npm WARN build No license field.

    npm verb stack Error: ENOENT: no such file or directory, chmod '/opt/atlassian/pipelines/agent/build/node_modules/@companyname/apexdocs/lib/cli/generate.js'

    npm verb cwd /opt/atlassian/pipelines/agent/build

    npm verb Linux 5.4.92-flatcar

    npm verb argv "/root/.nvm/versions/node/v14.17.5/bin/node" "/root/.nvm/versions/node/v14.17.5/bin/npm" "install" "git+ssh://git@bitbucket.org:companyname/apexdocs.git#1.x-fork" "-verbose"

    npm verb node v14.17.5

    npm verb npm  v6.14.14

    npm ERR! code ENOENT

    npm ERR! syscall chmod

    npm ERR! path /opt/atlassian/pipelines/agent/build/node_modules/@companyname/apexdocs/lib/cli/generate.js

    npm ERR! errno -2

    npm ERR! enoent ENOENT: no such file or directory, chmod '/opt/atlassian/pipelines/agent/build/node_modules/@companyname/apexdocs/lib/cli/generate.js'

    npm ERR! enoent This is related to npm not being able to find a file.

    npm ERR! enoent 

    npm verb exit [ -2, true ]

    npm timing npm Completed in 13309ms


Answers:
author: Frederik Mann
body: I changed images. Maybe the node image has a newer version of npm and is configured differently.

```
image: atlassian/default-image:3

image: node
```


author: Igor Stoyanov
body: [@Frederik Mann](/t5/user/viewprofilepage/user-id/4001997) hi. Thanks for your question.

Please, look at [this question](https://stackoverflow.com/questions/17509669/how-to-install-an-npm-package-from-github-directly):
> Repository you want to install must be a **npm module** , it must contain a `package.json`

Regards, Igor.

comments: author: Frederik Mann
body: Hi [@Igor Stoyanov](/t5/user/viewprofilepage/user-id/4550492) ,

thank you for your answer but as you can see in the stackoverflow post, I am already using the suggested:

    git+https://github.com/visionmedia/express.git


author: Igor Stoyanov
body: Please look at [this comment](https://stackoverflow.com/questions/17509669/how-to-install-an-npm-package-from-github-directly#comment38864963_17509764)
> Note that repository you want to install must be a **npm module** , it must contain a `package.json` file or else you will get this error: `Error: ENOENT, open 'tmp.tgz-unpack/package.json'`.


author: Frederik Mann
body: The repository I want to install is an npm module (with typescript code).

Otherwise I could not install it on my local machine.


author: Frederik Mann
body: I have edited the error to include the verbose output.  
This is how the command looks only my own machine with the very same command:  

```
npm info it worked if it ends with ok

npm verb cli [

npm verb cli '/home/fmann/.nvm/versions/node/v14.18.2/bin/node',

npm verb cli '/home/fmann/.nvm/versions/node/v14.18.2/bin/npm',

npm verb cli 'install',

npm verb cli 'git+ssh://git@bitbucket.org:companyname/apexdocs.git#1.x-fork',

npm verb cli '-verbose'

npm verb cli ]

npm info using npm@6.14.15

npm info using node@v14.18.2

npm verb npm-session fd59cb80f9ba9a7c

npm verb prepareGitDep git+ssh://git@bitbucket.org/companyname/apexdocs.git#1.x-fork: installing devDeps and running prepare script.

npm info lifecycle @companyname/apexdocs@1.13.7~prepack: @companyname/apexdocs@1.13.7

npm info lifecycle @companyname/apexdocs@1.13.7~postpack: @companyname/apexdocs@1.13.7

npm timing stage:loadCurrentTree Completed in 14048ms

npm timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms

npm timing stage:loadIdealTree:loadShrinkwrap Completed in 0ms

npm http fetch GET 200 https://registry.npmjs.org/sanitize-filename-ts 120ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/markdown-table-ts 122ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/fast-xml-parser 127ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/sanitize-filename-ts/-/sanitize-filename-ts-1.0.2.tgz 182ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/markdown-table-ts/-/markdown-table-ts-1.0.3.tgz 183ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.0.0-beta.8.tgz 179ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/html-entities 392ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/yargs 390ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/html-entities/-/html-entities-2.3.2.tgz 3ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz 5ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/strnum 1ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz 2ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/truncate-utf8-bytes 0ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz 2ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/utf8-byte-length 1ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz 1ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/escalade 27ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz 3ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/cliui 34ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz 2ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/string-width 62ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/get-caller-file 64ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/require-directory 67ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz 6ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/y18n 69ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz 6ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz 4ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz 4ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/yargs-parser 74ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz 3ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/strip-ansi 39ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/wrap-ansi 41ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz 3ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz 4ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/is-fullwidth-code-point 30ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/emoji-regex 31ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz 3ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz 4ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/ansi-regex 29ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz 5ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/ansi-styles 34ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz 6ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/color-convert 29ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz 3ms (from cache)

npm http fetch GET 304 https://registry.npmjs.org/color-name 31ms (from cache)

npm http fetch GET 200 https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz 2ms (from cache)

npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 758ms

npm timing stage:loadIdealTree Completed in 765ms

npm timing stage:generateActionsToTake Completed in 4ms

npm verb correctMkdir /home/fmann/.npm/_locks correctMkdir not in flight; initializing

npm verb lock using /home/fmann/.npm/_locks/staging-d21fdfcfdd04dd1f.lock for /home/fmann/Projects/npmtests/node_modules/.staging

npm timing action:extract Completed in 88ms

npm timing action:finalize Completed in 8ms

npm timing action:refresh-package-json Completed in 32ms

npm info lifecycle ansi-regex@5.0.1~preinstall: ansi-regex@5.0.1

npm info lifecycle color-name@1.1.4~preinstall: color-name@1.1.4

npm info lifecycle color-convert@2.0.1~preinstall: color-convert@2.0.1

npm info lifecycle ansi-styles@4.3.0~preinstall: ansi-styles@4.3.0

npm info lifecycle emoji-regex@8.0.0~preinstall: emoji-regex@8.0.0

npm info lifecycle escalade@3.1.1~preinstall: escalade@3.1.1

npm info lifecycle get-caller-file@2.0.5~preinstall: get-caller-file@2.0.5

npm info lifecycle is-fullwidth-code-point@3.0.0~preinstall: is-fullwidth-code-point@3.0.0

npm info lifecycle require-directory@2.1.1~preinstall: require-directory@2.1.1

npm info lifecycle strip-ansi@6.0.1~preinstall: strip-ansi@6.0.1

npm info lifecycle string-width@4.2.3~preinstall: string-width@4.2.3

npm info lifecycle strnum@1.0.5~preinstall: strnum@1.0.5

npm info lifecycle utf8-byte-length@1.0.4~preinstall: utf8-byte-length@1.0.4

npm info lifecycle truncate-utf8-bytes@1.0.2~preinstall: truncate-utf8-bytes@1.0.2

npm info lifecycle wrap-ansi@7.0.0~preinstall: wrap-ansi@7.0.0

npm info lifecycle cliui@7.0.4~preinstall: cliui@7.0.4

npm info lifecycle y18n@5.0.8~preinstall: y18n@5.0.8

npm info lifecycle yargs-parser@20.2.9~preinstall: yargs-parser@20.2.9

npm info lifecycle fast-xml-parser@4.0.0-beta.8~preinstall: fast-xml-parser@4.0.0-beta.8

npm info lifecycle html-entities@2.3.2~preinstall: html-entities@2.3.2

npm info lifecycle markdown-table-ts@1.0.3~preinstall: markdown-table-ts@1.0.3

npm info lifecycle sanitize-filename-ts@1.0.2~preinstall: sanitize-filename-ts@1.0.2

npm info lifecycle yargs@16.2.0~preinstall: yargs@16.2.0

npm info lifecycle @companyname/apexdocs@1.13.7~preinstall: @companyname/apexdocs@1.13.7

npm timing action:preinstall Completed in 2ms

npm info linkStuff ansi-regex@5.0.1

npm info linkStuff color-name@1.1.4

npm info linkStuff color-convert@2.0.1

npm info linkStuff ansi-styles@4.3.0

npm info linkStuff emoji-regex@8.0.0

npm info linkStuff escalade@3.1.1

npm info linkStuff get-caller-file@2.0.5

npm info linkStuff is-fullwidth-code-point@3.0.0

npm info linkStuff require-directory@2.1.1

npm info linkStuff strip-ansi@6.0.1

npm info linkStuff string-width@4.2.3

npm info linkStuff strnum@1.0.5

npm info linkStuff utf8-byte-length@1.0.4

npm info linkStuff truncate-utf8-bytes@1.0.2

npm info linkStuff wrap-ansi@7.0.0

npm info linkStuff cliui@7.0.4

npm info linkStuff y18n@5.0.8

npm info linkStuff yargs-parser@20.2.9

npm info linkStuff fast-xml-parser@4.0.0-beta.8

npm verb linkBins [

npm verb linkBins { fxparser: 'src/cli/cli.js' },

npm verb linkBins '/home/fmann/Projects/npmtests/node_modules/.bin',

npm verb linkBins false

npm verb linkBins ]

npm info linkStuff html-entities@2.3.2

npm info linkStuff markdown-table-ts@1.0.3

npm info linkStuff sanitize-filename-ts@1.0.2

npm info linkStuff yargs@16.2.0

npm info linkStuff @companyname/apexdocs@1.13.7

npm verb linkBins [

npm verb linkBins { 'apexdocs-generate': 'lib/cli/generate.js' },

npm verb linkBins '/home/fmann/Projects/npmtests/node_modules/.bin',

npm verb linkBins false

npm verb linkBins ]

npm timing action:build Completed in 7ms <- THIS DOES NOT SEAM TO PRODUCE THE SAME RESULT IN THE PIPELINE

npm info lifecycle ansi-regex@5.0.1~install: ansi-regex@5.0.1

npm info lifecycle color-name@1.1.4~install: color-name@1.1.4

npm info lifecycle color-convert@2.0.1~install: color-convert@2.0.1

npm info lifecycle ansi-styles@4.3.0~install: ansi-styles@4.3.0

npm info lifecycle emoji-regex@8.0.0~install: emoji-regex@8.0.0

npm info lifecycle escalade@3.1.1~install: escalade@3.1.1

npm info lifecycle get-caller-file@2.0.5~install: get-caller-file@2.0.5

npm info lifecycle is-fullwidth-code-point@3.0.0~install: is-fullwidth-code-point@3.0.0

npm info lifecycle require-directory@2.1.1~install: require-directory@2.1.1

npm info lifecycle strip-ansi@6.0.1~install: strip-ansi@6.0.1

npm info lifecycle string-width@4.2.3~install: string-width@4.2.3

npm info lifecycle strnum@1.0.5~install: strnum@1.0.5

npm info lifecycle utf8-byte-length@1.0.4~install: utf8-byte-length@1.0.4

npm info lifecycle truncate-utf8-bytes@1.0.2~install: truncate-utf8-bytes@1.0.2

npm info lifecycle wrap-ansi@7.0.0~install: wrap-ansi@7.0.0

npm info lifecycle cliui@7.0.4~install: cliui@7.0.4

npm info lifecycle y18n@5.0.8~install: y18n@5.0.8

npm info lifecycle yargs-parser@20.2.9~install: yargs-parser@20.2.9

npm info lifecycle fast-xml-parser@4.0.0-beta.8~install: fast-xml-parser@4.0.0-beta.8

npm info lifecycle html-entities@2.3.2~install: html-entities@2.3.2

npm info lifecycle markdown-table-ts@1.0.3~install: markdown-table-ts@1.0.3

npm info lifecycle sanitize-filename-ts@1.0.2~install: sanitize-filename-ts@1.0.2

npm info lifecycle yargs@16.2.0~install: yargs@16.2.0

npm info lifecycle @companyname/apexdocs@1.13.7~install: @companyname/apexdocs@1.13.7

npm timing action:install Completed in 2ms

npm info lifecycle ansi-regex@5.0.1~postinstall: ansi-regex@5.0.1

npm info lifecycle color-name@1.1.4~postinstall: color-name@1.1.4

npm info lifecycle color-convert@2.0.1~postinstall: color-convert@2.0.1

npm info lifecycle ansi-styles@4.3.0~postinstall: ansi-styles@4.3.0

npm info lifecycle emoji-regex@8.0.0~postinstall: emoji-regex@8.0.0

npm info lifecycle escalade@3.1.1~postinstall: escalade@3.1.1

npm info lifecycle get-caller-file@2.0.5~postinstall: get-caller-file@2.0.5

npm info lifecycle is-fullwidth-code-point@3.0.0~postinstall: is-fullwidth-code-point@3.0.0

npm info lifecycle require-directory@2.1.1~postinstall: require-directory@2.1.1

npm info lifecycle strip-ansi@6.0.1~postinstall: strip-ansi@6.0.1

npm info lifecycle string-width@4.2.3~postinstall: string-width@4.2.3

npm info lifecycle strnum@1.0.5~postinstall: strnum@1.0.5

npm info lifecycle utf8-byte-length@1.0.4~postinstall: utf8-byte-length@1.0.4

npm info lifecycle truncate-utf8-bytes@1.0.2~postinstall: truncate-utf8-bytes@1.0.2

npm info lifecycle wrap-ansi@7.0.0~postinstall: wrap-ansi@7.0.0

npm info lifecycle cliui@7.0.4~postinstall: cliui@7.0.4

npm info lifecycle y18n@5.0.8~postinstall: y18n@5.0.8

npm info lifecycle yargs-parser@20.2.9~postinstall: yargs-parser@20.2.9

npm info lifecycle fast-xml-parser@4.0.0-beta.8~postinstall: fast-xml-parser@4.0.0-beta.8

npm info lifecycle html-entities@2.3.2~postinstall: html-entities@2.3.2

npm info lifecycle markdown-table-ts@1.0.3~postinstall: markdown-table-ts@1.0.3

npm info lifecycle sanitize-filename-ts@1.0.2~postinstall: sanitize-filename-ts@1.0.2

npm info lifecycle yargs@16.2.0~postinstall: yargs@16.2.0

npm info lifecycle @companyname/apexdocs@1.13.7~postinstall: @companyname/apexdocs@1.13.7

npm timing action:postinstall Completed in 2ms

npm verb unlock done using /home/fmann/.npm/_locks/staging-d21fdfcfdd04dd1f.lock for /home/fmann/Projects/npmtests/node_modules/.staging

npm timing stage:executeActions Completed in 153ms

npm timing stage:rollbackFailedOptional Completed in 0ms

npm timing stage:runTopLevelLifecycles Completed in 14978ms

npm WARN saveError ENOENT: no such file or directory, open '/home/fmann/Projects/npmtests/package.json'

npm info lifecycle undefined~preshrinkwrap: undefined

npm info lifecycle undefined~shrinkwrap: undefined

npm notice created a lockfile as package-lock.json. You should commit this file.

npm info lifecycle undefined~postshrinkwrap: undefined

npm WARN enoent ENOENT: no such file or directory, open '/home/fmann/Projects/npmtests/package.json'

npm verb enoent This is related to npm not being able to find a file.

npm verb enoent

npm WARN npmtests No description

npm WARN npmtests No repository field.

npm WARN npmtests No README data

npm WARN npmtests No license field.
```


author: Igor Stoyanov
body: [@Frederik Mann](/t5/user/viewprofilepage/user-id/4001997) try to add:

```
 - unset CI
```

to your script.

Example:

```
script:
  - t=$(pwd)/docs
  - s=$(pwd)/force-app/main/default/classes
  - unset CI
  - npm i git+https://github.com/cesarParra/apexdocs.git#1.x??
```

[Related question](https://community.atlassian.com/t5/Bitbucket-Pipelines-questions/Docker-build-fails-in-the-pipeline-with-npm-error-while-builds/qaq-p/1876823#M9083)

Regards, Igor.


author: Igor Stoyanov
body: Also take a look at [this question](https://community.atlassian.com/t5/Bitbucket-questions/Pipelines-with-node-image-no-such-file-or-directory-open-opt/qaq-p/415211)


author: Frederik Mann
body: [@Igor Stoyanov](/t5/user/viewprofilepage/user-id/4550492)I tried it with "unset CI" but it did not help.

<br />

I changed images from "atlassian/default-image:3" to node and it works now.


author: Frederik Mann
body: [@Igor Stoyanov](/t5/user/viewprofilepage/user-id/4550492)Thank you :)


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

npm