npm install error included as both a dev and production dependency












0















12915 warn whisper-chat-example@1.0.0 No repository field.
12916 warn The package web3 is included as both a dev and production dependency.
12917 verbose type ProcessTerminatedError
12918 verbose stack ProcessTerminatedError: cancel after 1 retries!
12918 verbose stack at Farm.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js:87:25)
12918 verbose stack at Array.forEach (<anonymous>)
12918 verbose stack at Farm.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js:81:36)
12918 verbose stack at ontimeout (timers.js:427:11)
12918 verbose stack at tryOnTimeout (timers.js:289:5)
12918 verbose stack at listOnTimeout (timers.js:252:5)
12918 verbose stack at Timer.processTimers (timers.js:212:10)
12919 verbose cwd /Users/ishansrivastava/Desktop/blocks/Decentralized_Chat
12920 verbose Darwin 18.0.0
12921 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
12922 verbose node v10.1.0
12923 verbose npm v6.0.1
12924 error cancel after 1 retries!
12925 verbose exit [ 1, true ]


I don't understand what is wrong. How do I solve this? Is it something related with the line included as both a dev and production dependency?



While running npm run dev I get:



sh: cross-env: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! whisper-chat-example@1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --hot`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the whisper-chat-example@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.









share|improve this question

























  • It seems that cross-dev is a npm package which needs to be installed globally, but it isn't. Try npm i cross-env -g before running npm run dev.

    – Sachin Gupta
    Nov 13 '18 at 19:04


















0















12915 warn whisper-chat-example@1.0.0 No repository field.
12916 warn The package web3 is included as both a dev and production dependency.
12917 verbose type ProcessTerminatedError
12918 verbose stack ProcessTerminatedError: cancel after 1 retries!
12918 verbose stack at Farm.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js:87:25)
12918 verbose stack at Array.forEach (<anonymous>)
12918 verbose stack at Farm.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js:81:36)
12918 verbose stack at ontimeout (timers.js:427:11)
12918 verbose stack at tryOnTimeout (timers.js:289:5)
12918 verbose stack at listOnTimeout (timers.js:252:5)
12918 verbose stack at Timer.processTimers (timers.js:212:10)
12919 verbose cwd /Users/ishansrivastava/Desktop/blocks/Decentralized_Chat
12920 verbose Darwin 18.0.0
12921 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
12922 verbose node v10.1.0
12923 verbose npm v6.0.1
12924 error cancel after 1 retries!
12925 verbose exit [ 1, true ]


I don't understand what is wrong. How do I solve this? Is it something related with the line included as both a dev and production dependency?



While running npm run dev I get:



sh: cross-env: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! whisper-chat-example@1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --hot`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the whisper-chat-example@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.









share|improve this question

























  • It seems that cross-dev is a npm package which needs to be installed globally, but it isn't. Try npm i cross-env -g before running npm run dev.

    – Sachin Gupta
    Nov 13 '18 at 19:04
















0












0








0








12915 warn whisper-chat-example@1.0.0 No repository field.
12916 warn The package web3 is included as both a dev and production dependency.
12917 verbose type ProcessTerminatedError
12918 verbose stack ProcessTerminatedError: cancel after 1 retries!
12918 verbose stack at Farm.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js:87:25)
12918 verbose stack at Array.forEach (<anonymous>)
12918 verbose stack at Farm.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js:81:36)
12918 verbose stack at ontimeout (timers.js:427:11)
12918 verbose stack at tryOnTimeout (timers.js:289:5)
12918 verbose stack at listOnTimeout (timers.js:252:5)
12918 verbose stack at Timer.processTimers (timers.js:212:10)
12919 verbose cwd /Users/ishansrivastava/Desktop/blocks/Decentralized_Chat
12920 verbose Darwin 18.0.0
12921 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
12922 verbose node v10.1.0
12923 verbose npm v6.0.1
12924 error cancel after 1 retries!
12925 verbose exit [ 1, true ]


I don't understand what is wrong. How do I solve this? Is it something related with the line included as both a dev and production dependency?



While running npm run dev I get:



sh: cross-env: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! whisper-chat-example@1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --hot`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the whisper-chat-example@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.









share|improve this question
















12915 warn whisper-chat-example@1.0.0 No repository field.
12916 warn The package web3 is included as both a dev and production dependency.
12917 verbose type ProcessTerminatedError
12918 verbose stack ProcessTerminatedError: cancel after 1 retries!
12918 verbose stack at Farm.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js:87:25)
12918 verbose stack at Array.forEach (<anonymous>)
12918 verbose stack at Farm.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js:81:36)
12918 verbose stack at ontimeout (timers.js:427:11)
12918 verbose stack at tryOnTimeout (timers.js:289:5)
12918 verbose stack at listOnTimeout (timers.js:252:5)
12918 verbose stack at Timer.processTimers (timers.js:212:10)
12919 verbose cwd /Users/ishansrivastava/Desktop/blocks/Decentralized_Chat
12920 verbose Darwin 18.0.0
12921 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
12922 verbose node v10.1.0
12923 verbose npm v6.0.1
12924 error cancel after 1 retries!
12925 verbose exit [ 1, true ]


I don't understand what is wrong. How do I solve this? Is it something related with the line included as both a dev and production dependency?



While running npm run dev I get:



sh: cross-env: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! whisper-chat-example@1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --hot`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the whisper-chat-example@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.






javascript node.js npm npm-install package.json






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 18:49







J. Doe

















asked Nov 13 '18 at 18:22









J. DoeJ. Doe

186




186













  • It seems that cross-dev is a npm package which needs to be installed globally, but it isn't. Try npm i cross-env -g before running npm run dev.

    – Sachin Gupta
    Nov 13 '18 at 19:04





















  • It seems that cross-dev is a npm package which needs to be installed globally, but it isn't. Try npm i cross-env -g before running npm run dev.

    – Sachin Gupta
    Nov 13 '18 at 19:04



















It seems that cross-dev is a npm package which needs to be installed globally, but it isn't. Try npm i cross-env -g before running npm run dev.

– Sachin Gupta
Nov 13 '18 at 19:04







It seems that cross-dev is a npm package which needs to be installed globally, but it isn't. Try npm i cross-env -g before running npm run dev.

– Sachin Gupta
Nov 13 '18 at 19:04














1 Answer
1






active

oldest

votes


















0














As the error says, you have the package defined in both dev and production dependencies.



If you need the package to be used in development only, you have to define it ONLY in dev dependencies.
If you need in in production, remove it from the devDependencies and define it in dependecies ONLY.



About the cross-env, you need to install it as global package with npm install cross-env -g. This way the command will be recognized and don't return an error.






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%2f53287293%2fnpm-install-error-included-as-both-a-dev-and-production-dependency%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














    As the error says, you have the package defined in both dev and production dependencies.



    If you need the package to be used in development only, you have to define it ONLY in dev dependencies.
    If you need in in production, remove it from the devDependencies and define it in dependecies ONLY.



    About the cross-env, you need to install it as global package with npm install cross-env -g. This way the command will be recognized and don't return an error.






    share|improve this answer




























      0














      As the error says, you have the package defined in both dev and production dependencies.



      If you need the package to be used in development only, you have to define it ONLY in dev dependencies.
      If you need in in production, remove it from the devDependencies and define it in dependecies ONLY.



      About the cross-env, you need to install it as global package with npm install cross-env -g. This way the command will be recognized and don't return an error.






      share|improve this answer


























        0












        0








        0







        As the error says, you have the package defined in both dev and production dependencies.



        If you need the package to be used in development only, you have to define it ONLY in dev dependencies.
        If you need in in production, remove it from the devDependencies and define it in dependecies ONLY.



        About the cross-env, you need to install it as global package with npm install cross-env -g. This way the command will be recognized and don't return an error.






        share|improve this answer













        As the error says, you have the package defined in both dev and production dependencies.



        If you need the package to be used in development only, you have to define it ONLY in dev dependencies.
        If you need in in production, remove it from the devDependencies and define it in dependecies ONLY.



        About the cross-env, you need to install it as global package with npm install cross-env -g. This way the command will be recognized and don't return an error.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 13 '18 at 19:58









        VBORISOVVBORISOV

        235




        235






























            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53287293%2fnpm-install-error-included-as-both-a-dev-and-production-dependency%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

            Bressuire

            Vorschmack

            Quarantine