building failing EPERM: operation not permitted

ismail.mayat's Avatar

ismail.mayat

03 Apr, 2019 07:52 AM

I have a build and part of it is running npm install, it was working but now am constantly getting errors like:

npm WARN tarball tarball data for customizr@https://github.com/Modernizr/customizr/tarball/develop (sha1-L7ebXglS89LUa3xaZl5k4vXnWi4=) seems to be corrupted. Trying one more time.
npm ERR! code EINTEGRITY
npm ERR! sha1-L7ebXglS89LUa3xaZl5k4vXnWi4= integrity checksum failed when using sha1: wanted sha1-L7ebXglS89LUa3xaZl5k4vXnWi4= but got sha512-o23lbaRfYHc9trILnhuI/JKL27eVCtFlDz1eBHZCu1/eBaX7Ji7Ngjh3FzS9qt76HCqgEZbPZ0Yxl8oBukiYHg== sha1-Q5OAUt7SGP3tijTfNg0wqXGljI8=. (44192 bytes)

EPERM: operation not permitted

I was getting these errors before but i recreated new package json lock file and that got the build working however its failing again. My yml files looks like:

  before_build:
    - nuget restore
    - npm install -g grunt-cli
    - cd mysite
    - set PATH=C:\Ruby22\bin;%PATH%
    - gem install compass
    - appveyor-retry npm install
    - grunt prod

Any ideas?

  1. Support Staff 1 Posted by Owen McDonnell on 03 Apr, 2019 03:02 PM

    Owen McDonnell's Avatar

    You mentioned that you recreated the package-lock.json file and it worked previously. But did you do that on the non-master branch that seems to be failing now?
    That would be my first guess for what's causing the hash integrity error.

  2. 2 Posted by ismail.mayat on 03 Apr, 2019 03:34 PM

    ismail.mayat's Avatar

    its failing on both branches master and uat was working on both branches. However when i inherited this project it was not working so i deleted the lock file then generated new lock file and commited and pushed and got the build working. Since then I have not changed anything front end just some mark up changes then pushed and now i get this error.

  3. Support Staff 3 Posted by Owen McDonnell on 03 Apr, 2019 05:33 PM

    Owen McDonnell's Avatar

    What happens if you try a branch where you don't include the lock file at all (or delete it before running npm install)?

  4. 4 Posted by ismail.mayat on 04 Apr, 2019 08:17 AM

    ismail.mayat's Avatar

    The build gets alot further but then fails with following error message:

    Running "requirejs:dist" (requirejs) task
    Running "modernizr:dist" (modernizr) task
    Warning: ENOENT: no such file or directory, open 'C:\projects\mysite\node_modules\modernizr\node_modules\lodash\lodash.js' Use --force to continue.

  5. Support Staff 5 Posted by Owen McDonnell on 04 Apr, 2019 03:09 PM

    Owen McDonnell's Avatar

    And have you run this build locally?
    Can you provide a link to the specific project/build and share your full configuration.

  6. 6 Posted by ismail.mayat on 08 Apr, 2019 03:25 PM

    ismail.mayat's Avatar

    Owen,
    Runs fine locally. Locally i have

    Node - v10.15.1
    npm - 6.4.1

    The build config looks like

    #uat configuration
    -
      branches:
        only:
          - uat
          
      #version format
      version: 1.0.{build}

      configuration: UAT
      
      cache:
        - packages -> **\packages.config
        
      before_build:
        - nuget restore
        - npm install -g grunt-cli
        - npm install --save lodash
        - cd Web.UI
        - set PATH=C:\Ruby22\bin;%PATH%
        - gem install compass
        - appveyor-retry npm install
        - grunt prod
      
      build:
        publish_wap: true
        project: UK.sln

      deploy:
        provider: Environment
        name: UAT Main Site
        app_offline: true
        skip_dirs: \\App_Data

    The link to build is https://ci.appveyor.com/project/PCUK/pcuk-main-site/builds/23592210

  7. Support Staff 7 Posted by Owen McDonnell on 08 Apr, 2019 08:46 PM

    Owen McDonnell's Avatar

    From your build log the command npm install --save lodash is causing an error since there is no package.json in your base directory.

    Perhaps you meant to put that command after the cd Web.UI?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac