On npm Install I am getting “Unhandled rejection Error: Integrity check failed”, but when I delete...












0














I have a nodejs project versioned in a GIT repo. When I clone the project, the package-lock.json is included (as it should be) but when I execute "npm install" I get the error Unhandled rejection Error: Integrity check failed



If I delete the package-lock.json everything works




  • node version: 8.14.0

  • npm version: 6.5.0


Package.json:



"dependencies": {
"aws-sdk": "^2.258.1",
"localmodule": "file:../LocalModule/dist/localmodule-1.1.1.tgz"
},
"devDependencies": {
"@types/chai": "^4.1.4",
"@types/mocha": "^5.2.2",
"@types/node": "^10.3.2",
"@types/sinon": "^5.0.1",
"aws-sdk-mock": "^2.0.0",
"chai": "^4.1.2",
"merge2": "^1.2.2",
"mocha": "^5.2.0",
"nps": "^5.9.2",
"nps-utils": "^1.6.0",
"sinon": "^5.0.10",
"sinon-chai": "^3.1.0",
"ts-node": "^6.1.1",
"typescript": "^3.1.6"
}


Full error:



Unhandled rejection Error: Integrity check failed:from@0.1.7 extracted to /home/...
Wanted: sha512-atI2DklW/phzBW2RyPznpbepvl1aRh7Y0XHfguqv...
Found: sha512-9BeJ7UP5OY9cUDsNXlHaYL6Xqd1cARifioOEtF60...
at checksumError (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:157:13)
at write (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:35:22)
at putData (/usr/lib/node_modules/npm/node_modules/cacache/put.js:29:10)
at Object.x.put (/usr/lib/node_modules/npm/node_modules/cacache/locales/en.js:28:37)
at readFileAsync.then.data (/usr/lib/node_modules/npm/node_modules/pacote/lib/fetchers/file.js:38:28)
at tryCatcher (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:694:18)
at Promise._fulfill (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18)
at /usr/lib/node_modules/npm/node_modules/bluebird/js/release/nodeback.js:42:21
at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:90:16
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)









share|improve this question






















  • Does this keep happening? Do you know which module is causing the problem?
    – Mikkel
    Dec 27 '18 at 20:06










  • It keeps happening. I don't know if any module is causing the issue. In other cases it seemed a npm bug with an specific version. But I have updated it the problem remains.
    – miqrc
    Dec 27 '18 at 20:11






  • 1




    So what package is locked with that sha signature?
    – xjedam
    Dec 27 '18 at 20:12






  • 1




    Basically it saves the sha checksum of the npm module - to make sure that the file hasn't been modified or corrupted. It's not a fatal condition, but I'm sure it will be annoying. It might also be a bad npm module. To see what it fixes, trying doing a git diff of the file to see what it changes
    – Mikkel
    Dec 27 '18 at 20:17










  • Ok. The package causing the problem is my local module. I have another project where I package the module always with the same name "localmodule-1.1.1.tgz". I understand that If the content of the package has changed but not the name nor the version, npm realizes that the package I am trying to install doesn't match the previous installed (looking at package-lock.json). This makes sense? Thanks.
    – miqrc
    Dec 27 '18 at 20:28
















0














I have a nodejs project versioned in a GIT repo. When I clone the project, the package-lock.json is included (as it should be) but when I execute "npm install" I get the error Unhandled rejection Error: Integrity check failed



If I delete the package-lock.json everything works




  • node version: 8.14.0

  • npm version: 6.5.0


Package.json:



"dependencies": {
"aws-sdk": "^2.258.1",
"localmodule": "file:../LocalModule/dist/localmodule-1.1.1.tgz"
},
"devDependencies": {
"@types/chai": "^4.1.4",
"@types/mocha": "^5.2.2",
"@types/node": "^10.3.2",
"@types/sinon": "^5.0.1",
"aws-sdk-mock": "^2.0.0",
"chai": "^4.1.2",
"merge2": "^1.2.2",
"mocha": "^5.2.0",
"nps": "^5.9.2",
"nps-utils": "^1.6.0",
"sinon": "^5.0.10",
"sinon-chai": "^3.1.0",
"ts-node": "^6.1.1",
"typescript": "^3.1.6"
}


Full error:



Unhandled rejection Error: Integrity check failed:from@0.1.7 extracted to /home/...
Wanted: sha512-atI2DklW/phzBW2RyPznpbepvl1aRh7Y0XHfguqv...
Found: sha512-9BeJ7UP5OY9cUDsNXlHaYL6Xqd1cARifioOEtF60...
at checksumError (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:157:13)
at write (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:35:22)
at putData (/usr/lib/node_modules/npm/node_modules/cacache/put.js:29:10)
at Object.x.put (/usr/lib/node_modules/npm/node_modules/cacache/locales/en.js:28:37)
at readFileAsync.then.data (/usr/lib/node_modules/npm/node_modules/pacote/lib/fetchers/file.js:38:28)
at tryCatcher (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:694:18)
at Promise._fulfill (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18)
at /usr/lib/node_modules/npm/node_modules/bluebird/js/release/nodeback.js:42:21
at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:90:16
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)









share|improve this question






















  • Does this keep happening? Do you know which module is causing the problem?
    – Mikkel
    Dec 27 '18 at 20:06










  • It keeps happening. I don't know if any module is causing the issue. In other cases it seemed a npm bug with an specific version. But I have updated it the problem remains.
    – miqrc
    Dec 27 '18 at 20:11






  • 1




    So what package is locked with that sha signature?
    – xjedam
    Dec 27 '18 at 20:12






  • 1




    Basically it saves the sha checksum of the npm module - to make sure that the file hasn't been modified or corrupted. It's not a fatal condition, but I'm sure it will be annoying. It might also be a bad npm module. To see what it fixes, trying doing a git diff of the file to see what it changes
    – Mikkel
    Dec 27 '18 at 20:17










  • Ok. The package causing the problem is my local module. I have another project where I package the module always with the same name "localmodule-1.1.1.tgz". I understand that If the content of the package has changed but not the name nor the version, npm realizes that the package I am trying to install doesn't match the previous installed (looking at package-lock.json). This makes sense? Thanks.
    – miqrc
    Dec 27 '18 at 20:28














0












0








0







I have a nodejs project versioned in a GIT repo. When I clone the project, the package-lock.json is included (as it should be) but when I execute "npm install" I get the error Unhandled rejection Error: Integrity check failed



If I delete the package-lock.json everything works




  • node version: 8.14.0

  • npm version: 6.5.0


Package.json:



"dependencies": {
"aws-sdk": "^2.258.1",
"localmodule": "file:../LocalModule/dist/localmodule-1.1.1.tgz"
},
"devDependencies": {
"@types/chai": "^4.1.4",
"@types/mocha": "^5.2.2",
"@types/node": "^10.3.2",
"@types/sinon": "^5.0.1",
"aws-sdk-mock": "^2.0.0",
"chai": "^4.1.2",
"merge2": "^1.2.2",
"mocha": "^5.2.0",
"nps": "^5.9.2",
"nps-utils": "^1.6.0",
"sinon": "^5.0.10",
"sinon-chai": "^3.1.0",
"ts-node": "^6.1.1",
"typescript": "^3.1.6"
}


Full error:



Unhandled rejection Error: Integrity check failed:from@0.1.7 extracted to /home/...
Wanted: sha512-atI2DklW/phzBW2RyPznpbepvl1aRh7Y0XHfguqv...
Found: sha512-9BeJ7UP5OY9cUDsNXlHaYL6Xqd1cARifioOEtF60...
at checksumError (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:157:13)
at write (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:35:22)
at putData (/usr/lib/node_modules/npm/node_modules/cacache/put.js:29:10)
at Object.x.put (/usr/lib/node_modules/npm/node_modules/cacache/locales/en.js:28:37)
at readFileAsync.then.data (/usr/lib/node_modules/npm/node_modules/pacote/lib/fetchers/file.js:38:28)
at tryCatcher (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:694:18)
at Promise._fulfill (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18)
at /usr/lib/node_modules/npm/node_modules/bluebird/js/release/nodeback.js:42:21
at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:90:16
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)









share|improve this question













I have a nodejs project versioned in a GIT repo. When I clone the project, the package-lock.json is included (as it should be) but when I execute "npm install" I get the error Unhandled rejection Error: Integrity check failed



If I delete the package-lock.json everything works




  • node version: 8.14.0

  • npm version: 6.5.0


Package.json:



"dependencies": {
"aws-sdk": "^2.258.1",
"localmodule": "file:../LocalModule/dist/localmodule-1.1.1.tgz"
},
"devDependencies": {
"@types/chai": "^4.1.4",
"@types/mocha": "^5.2.2",
"@types/node": "^10.3.2",
"@types/sinon": "^5.0.1",
"aws-sdk-mock": "^2.0.0",
"chai": "^4.1.2",
"merge2": "^1.2.2",
"mocha": "^5.2.0",
"nps": "^5.9.2",
"nps-utils": "^1.6.0",
"sinon": "^5.0.10",
"sinon-chai": "^3.1.0",
"ts-node": "^6.1.1",
"typescript": "^3.1.6"
}


Full error:



Unhandled rejection Error: Integrity check failed:from@0.1.7 extracted to /home/...
Wanted: sha512-atI2DklW/phzBW2RyPznpbepvl1aRh7Y0XHfguqv...
Found: sha512-9BeJ7UP5OY9cUDsNXlHaYL6Xqd1cARifioOEtF60...
at checksumError (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:157:13)
at write (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:35:22)
at putData (/usr/lib/node_modules/npm/node_modules/cacache/put.js:29:10)
at Object.x.put (/usr/lib/node_modules/npm/node_modules/cacache/locales/en.js:28:37)
at readFileAsync.then.data (/usr/lib/node_modules/npm/node_modules/pacote/lib/fetchers/file.js:38:28)
at tryCatcher (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:694:18)
at Promise._fulfill (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18)
at /usr/lib/node_modules/npm/node_modules/bluebird/js/release/nodeback.js:42:21
at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:90:16
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)






node.js npm






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 27 '18 at 20:02









miqrc

12317




12317












  • Does this keep happening? Do you know which module is causing the problem?
    – Mikkel
    Dec 27 '18 at 20:06










  • It keeps happening. I don't know if any module is causing the issue. In other cases it seemed a npm bug with an specific version. But I have updated it the problem remains.
    – miqrc
    Dec 27 '18 at 20:11






  • 1




    So what package is locked with that sha signature?
    – xjedam
    Dec 27 '18 at 20:12






  • 1




    Basically it saves the sha checksum of the npm module - to make sure that the file hasn't been modified or corrupted. It's not a fatal condition, but I'm sure it will be annoying. It might also be a bad npm module. To see what it fixes, trying doing a git diff of the file to see what it changes
    – Mikkel
    Dec 27 '18 at 20:17










  • Ok. The package causing the problem is my local module. I have another project where I package the module always with the same name "localmodule-1.1.1.tgz". I understand that If the content of the package has changed but not the name nor the version, npm realizes that the package I am trying to install doesn't match the previous installed (looking at package-lock.json). This makes sense? Thanks.
    – miqrc
    Dec 27 '18 at 20:28


















  • Does this keep happening? Do you know which module is causing the problem?
    – Mikkel
    Dec 27 '18 at 20:06










  • It keeps happening. I don't know if any module is causing the issue. In other cases it seemed a npm bug with an specific version. But I have updated it the problem remains.
    – miqrc
    Dec 27 '18 at 20:11






  • 1




    So what package is locked with that sha signature?
    – xjedam
    Dec 27 '18 at 20:12






  • 1




    Basically it saves the sha checksum of the npm module - to make sure that the file hasn't been modified or corrupted. It's not a fatal condition, but I'm sure it will be annoying. It might also be a bad npm module. To see what it fixes, trying doing a git diff of the file to see what it changes
    – Mikkel
    Dec 27 '18 at 20:17










  • Ok. The package causing the problem is my local module. I have another project where I package the module always with the same name "localmodule-1.1.1.tgz". I understand that If the content of the package has changed but not the name nor the version, npm realizes that the package I am trying to install doesn't match the previous installed (looking at package-lock.json). This makes sense? Thanks.
    – miqrc
    Dec 27 '18 at 20:28
















Does this keep happening? Do you know which module is causing the problem?
– Mikkel
Dec 27 '18 at 20:06




Does this keep happening? Do you know which module is causing the problem?
– Mikkel
Dec 27 '18 at 20:06












It keeps happening. I don't know if any module is causing the issue. In other cases it seemed a npm bug with an specific version. But I have updated it the problem remains.
– miqrc
Dec 27 '18 at 20:11




It keeps happening. I don't know if any module is causing the issue. In other cases it seemed a npm bug with an specific version. But I have updated it the problem remains.
– miqrc
Dec 27 '18 at 20:11




1




1




So what package is locked with that sha signature?
– xjedam
Dec 27 '18 at 20:12




So what package is locked with that sha signature?
– xjedam
Dec 27 '18 at 20:12




1




1




Basically it saves the sha checksum of the npm module - to make sure that the file hasn't been modified or corrupted. It's not a fatal condition, but I'm sure it will be annoying. It might also be a bad npm module. To see what it fixes, trying doing a git diff of the file to see what it changes
– Mikkel
Dec 27 '18 at 20:17




Basically it saves the sha checksum of the npm module - to make sure that the file hasn't been modified or corrupted. It's not a fatal condition, but I'm sure it will be annoying. It might also be a bad npm module. To see what it fixes, trying doing a git diff of the file to see what it changes
– Mikkel
Dec 27 '18 at 20:17












Ok. The package causing the problem is my local module. I have another project where I package the module always with the same name "localmodule-1.1.1.tgz". I understand that If the content of the package has changed but not the name nor the version, npm realizes that the package I am trying to install doesn't match the previous installed (looking at package-lock.json). This makes sense? Thanks.
– miqrc
Dec 27 '18 at 20:28




Ok. The package causing the problem is my local module. I have another project where I package the module always with the same name "localmodule-1.1.1.tgz". I understand that If the content of the package has changed but not the name nor the version, npm realizes that the package I am trying to install doesn't match the previous installed (looking at package-lock.json). This makes sense? Thanks.
– miqrc
Dec 27 '18 at 20:28












1 Answer
1






active

oldest

votes


















0














The package causing the problem is my local module. I have another project where I package the module always with the same name "localmodule-1.1.1.tgz".
The checksum of this module is stored the package-lock.json.
When I change the content of the module, but not the name, npm detects that I am trying to install the same module but the checksum doesn't match.






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53950279%2fon-npm-install-i-am-getting-unhandled-rejection-error-integrity-check-failed%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    The package causing the problem is my local module. I have another project where I package the module always with the same name "localmodule-1.1.1.tgz".
    The checksum of this module is stored the package-lock.json.
    When I change the content of the module, but not the name, npm detects that I am trying to install the same module but the checksum doesn't match.






    share|improve this answer


























      0














      The package causing the problem is my local module. I have another project where I package the module always with the same name "localmodule-1.1.1.tgz".
      The checksum of this module is stored the package-lock.json.
      When I change the content of the module, but not the name, npm detects that I am trying to install the same module but the checksum doesn't match.






      share|improve this answer
























        0












        0








        0






        The package causing the problem is my local module. I have another project where I package the module always with the same name "localmodule-1.1.1.tgz".
        The checksum of this module is stored the package-lock.json.
        When I change the content of the module, but not the name, npm detects that I am trying to install the same module but the checksum doesn't match.






        share|improve this answer












        The package causing the problem is my local module. I have another project where I package the module always with the same name "localmodule-1.1.1.tgz".
        The checksum of this module is stored the package-lock.json.
        When I change the content of the module, but not the name, npm detects that I am trying to install the same module but the checksum doesn't match.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 28 '18 at 9:58









        miqrc

        12317




        12317






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53950279%2fon-npm-install-i-am-getting-unhandled-rejection-error-integrity-check-failed%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Mossoró

            Can't read property showImagePicker of undefined in react native iOS

            Pushsharp Apns notification error: 'InvalidToken'