path.js:1086 Error: ENOENT: no such file or directory, uv_cwd





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I was following the Webpack guide and get stuck here while running npm run build I received the this error:



path.js:1086
cwd = process.cwd();
^

Error: ENOENT: no such file or directory, uv_cwd
at Object.resolve (path.js:1086:25)
at Function.Module._resolveLookupPaths (internal/modules/cjs/loader.js:479:17)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:587:20)


I checked all imports and everything is looking fine. Than I thought is should caching issue so I ran npm cache clean -f surprisingly I get the exact same error. Probably it is NodeJS problem but I have no idea how to debug it.



Here is my file structure:



enter image description here



package.json



{
"name": "test_webpack",
"version": "1.0.0",
"description": "",
"private": true,
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"build": "webpack"
},
"keywords": ,
"author": "",
"license": "ISC",
"devDependencies": {
"clean-webpack-plugin": "^1.0.0",
"css-loader": "^1.0.1",
"csv-loader": "^3.0.2",
"file-loader": "^2.0.0",
"html-webpack-plugin": "^3.2.0",
"style-loader": "^0.23.1",
"webpack": "^4.25.1",
"webpack-cli": "^3.1.2",
"xml-loader": "^1.2.1"
},
"dependencies": {
"lodash": "^4.17.11"
}
}


webpack.config.js



const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CleanWebpackPlugin = require('clean-webpack-plugin')

module.exports = {
mode: 'development',
entry: {
app: './src/index.js',
print: './src/print.js',
sec: './src/secondClick.js'
},
devtool: 'inline-source-map',
plugins: [
new CleanWebpackPlugin(['dist']),
new HtmlWebpackPlugin({
titile: "Output manager from webpack n12"
})
],
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist')
}
};









share|improve this question





























    0















    I was following the Webpack guide and get stuck here while running npm run build I received the this error:



    path.js:1086
    cwd = process.cwd();
    ^

    Error: ENOENT: no such file or directory, uv_cwd
    at Object.resolve (path.js:1086:25)
    at Function.Module._resolveLookupPaths (internal/modules/cjs/loader.js:479:17)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:587:20)


    I checked all imports and everything is looking fine. Than I thought is should caching issue so I ran npm cache clean -f surprisingly I get the exact same error. Probably it is NodeJS problem but I have no idea how to debug it.



    Here is my file structure:



    enter image description here



    package.json



    {
    "name": "test_webpack",
    "version": "1.0.0",
    "description": "",
    "private": true,
    "scripts": {
    "test": "echo "Error: no test specified" && exit 1",
    "build": "webpack"
    },
    "keywords": ,
    "author": "",
    "license": "ISC",
    "devDependencies": {
    "clean-webpack-plugin": "^1.0.0",
    "css-loader": "^1.0.1",
    "csv-loader": "^3.0.2",
    "file-loader": "^2.0.0",
    "html-webpack-plugin": "^3.2.0",
    "style-loader": "^0.23.1",
    "webpack": "^4.25.1",
    "webpack-cli": "^3.1.2",
    "xml-loader": "^1.2.1"
    },
    "dependencies": {
    "lodash": "^4.17.11"
    }
    }


    webpack.config.js



    const path = require('path');
    const HtmlWebpackPlugin = require('html-webpack-plugin')
    const CleanWebpackPlugin = require('clean-webpack-plugin')

    module.exports = {
    mode: 'development',
    entry: {
    app: './src/index.js',
    print: './src/print.js',
    sec: './src/secondClick.js'
    },
    devtool: 'inline-source-map',
    plugins: [
    new CleanWebpackPlugin(['dist']),
    new HtmlWebpackPlugin({
    titile: "Output manager from webpack n12"
    })
    ],
    output: {
    filename: '[name].bundle.js',
    path: path.resolve(__dirname, 'dist')
    }
    };









    share|improve this question

























      0












      0








      0








      I was following the Webpack guide and get stuck here while running npm run build I received the this error:



      path.js:1086
      cwd = process.cwd();
      ^

      Error: ENOENT: no such file or directory, uv_cwd
      at Object.resolve (path.js:1086:25)
      at Function.Module._resolveLookupPaths (internal/modules/cjs/loader.js:479:17)
      at Function.Module._resolveFilename (internal/modules/cjs/loader.js:587:20)


      I checked all imports and everything is looking fine. Than I thought is should caching issue so I ran npm cache clean -f surprisingly I get the exact same error. Probably it is NodeJS problem but I have no idea how to debug it.



      Here is my file structure:



      enter image description here



      package.json



      {
      "name": "test_webpack",
      "version": "1.0.0",
      "description": "",
      "private": true,
      "scripts": {
      "test": "echo "Error: no test specified" && exit 1",
      "build": "webpack"
      },
      "keywords": ,
      "author": "",
      "license": "ISC",
      "devDependencies": {
      "clean-webpack-plugin": "^1.0.0",
      "css-loader": "^1.0.1",
      "csv-loader": "^3.0.2",
      "file-loader": "^2.0.0",
      "html-webpack-plugin": "^3.2.0",
      "style-loader": "^0.23.1",
      "webpack": "^4.25.1",
      "webpack-cli": "^3.1.2",
      "xml-loader": "^1.2.1"
      },
      "dependencies": {
      "lodash": "^4.17.11"
      }
      }


      webpack.config.js



      const path = require('path');
      const HtmlWebpackPlugin = require('html-webpack-plugin')
      const CleanWebpackPlugin = require('clean-webpack-plugin')

      module.exports = {
      mode: 'development',
      entry: {
      app: './src/index.js',
      print: './src/print.js',
      sec: './src/secondClick.js'
      },
      devtool: 'inline-source-map',
      plugins: [
      new CleanWebpackPlugin(['dist']),
      new HtmlWebpackPlugin({
      titile: "Output manager from webpack n12"
      })
      ],
      output: {
      filename: '[name].bundle.js',
      path: path.resolve(__dirname, 'dist')
      }
      };









      share|improve this question














      I was following the Webpack guide and get stuck here while running npm run build I received the this error:



      path.js:1086
      cwd = process.cwd();
      ^

      Error: ENOENT: no such file or directory, uv_cwd
      at Object.resolve (path.js:1086:25)
      at Function.Module._resolveLookupPaths (internal/modules/cjs/loader.js:479:17)
      at Function.Module._resolveFilename (internal/modules/cjs/loader.js:587:20)


      I checked all imports and everything is looking fine. Than I thought is should caching issue so I ran npm cache clean -f surprisingly I get the exact same error. Probably it is NodeJS problem but I have no idea how to debug it.



      Here is my file structure:



      enter image description here



      package.json



      {
      "name": "test_webpack",
      "version": "1.0.0",
      "description": "",
      "private": true,
      "scripts": {
      "test": "echo "Error: no test specified" && exit 1",
      "build": "webpack"
      },
      "keywords": ,
      "author": "",
      "license": "ISC",
      "devDependencies": {
      "clean-webpack-plugin": "^1.0.0",
      "css-loader": "^1.0.1",
      "csv-loader": "^3.0.2",
      "file-loader": "^2.0.0",
      "html-webpack-plugin": "^3.2.0",
      "style-loader": "^0.23.1",
      "webpack": "^4.25.1",
      "webpack-cli": "^3.1.2",
      "xml-loader": "^1.2.1"
      },
      "dependencies": {
      "lodash": "^4.17.11"
      }
      }


      webpack.config.js



      const path = require('path');
      const HtmlWebpackPlugin = require('html-webpack-plugin')
      const CleanWebpackPlugin = require('clean-webpack-plugin')

      module.exports = {
      mode: 'development',
      entry: {
      app: './src/index.js',
      print: './src/print.js',
      sec: './src/secondClick.js'
      },
      devtool: 'inline-source-map',
      plugins: [
      new CleanWebpackPlugin(['dist']),
      new HtmlWebpackPlugin({
      titile: "Output manager from webpack n12"
      })
      ],
      output: {
      filename: '[name].bundle.js',
      path: path.resolve(__dirname, 'dist')
      }
      };






      node.js npm webpack






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 16 '18 at 11:47









      Nedko DimitrovNedko Dimitrov

      583816




      583816
























          1 Answer
          1






          active

          oldest

          votes


















          1














          Try to change in your webpack.config:



            entry: {
          app: path.resolve(__dirname, 'src/index.js'),
          print: path.resolve(__dirname, 'src/print.js'),
          sec: path.resolve(__dirname, 'src/secondClick.js')
          },


          And make sure you run the command from the project root with:
          npx webpack --config webpack.config.js






          share|improve this answer


























          • no luck with that and get the same error again

            – Nedko Dimitrov
            Nov 16 '18 at 11:57






          • 1





            what OS do you use? What is the pwd where you run the build command?

            – lependu
            Nov 16 '18 at 12:01











          • Ubuntu 16.04 I tried running it from the project's root and from within the dist folder

            – Nedko Dimitrov
            Nov 16 '18 at 12:02






          • 1





            Stay in the project root and try to run it with npx webpack --config webpack.config.js

            – lependu
            Nov 16 '18 at 12:09











          • That worked out thanks. Edit your answer so I can accept it

            – Nedko Dimitrov
            Nov 16 '18 at 12:11












          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%2f53337269%2fpath-js1086-error-enoent-no-such-file-or-directory-uv-cwd%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









          1














          Try to change in your webpack.config:



            entry: {
          app: path.resolve(__dirname, 'src/index.js'),
          print: path.resolve(__dirname, 'src/print.js'),
          sec: path.resolve(__dirname, 'src/secondClick.js')
          },


          And make sure you run the command from the project root with:
          npx webpack --config webpack.config.js






          share|improve this answer


























          • no luck with that and get the same error again

            – Nedko Dimitrov
            Nov 16 '18 at 11:57






          • 1





            what OS do you use? What is the pwd where you run the build command?

            – lependu
            Nov 16 '18 at 12:01











          • Ubuntu 16.04 I tried running it from the project's root and from within the dist folder

            – Nedko Dimitrov
            Nov 16 '18 at 12:02






          • 1





            Stay in the project root and try to run it with npx webpack --config webpack.config.js

            – lependu
            Nov 16 '18 at 12:09











          • That worked out thanks. Edit your answer so I can accept it

            – Nedko Dimitrov
            Nov 16 '18 at 12:11
















          1














          Try to change in your webpack.config:



            entry: {
          app: path.resolve(__dirname, 'src/index.js'),
          print: path.resolve(__dirname, 'src/print.js'),
          sec: path.resolve(__dirname, 'src/secondClick.js')
          },


          And make sure you run the command from the project root with:
          npx webpack --config webpack.config.js






          share|improve this answer


























          • no luck with that and get the same error again

            – Nedko Dimitrov
            Nov 16 '18 at 11:57






          • 1





            what OS do you use? What is the pwd where you run the build command?

            – lependu
            Nov 16 '18 at 12:01











          • Ubuntu 16.04 I tried running it from the project's root and from within the dist folder

            – Nedko Dimitrov
            Nov 16 '18 at 12:02






          • 1





            Stay in the project root and try to run it with npx webpack --config webpack.config.js

            – lependu
            Nov 16 '18 at 12:09











          • That worked out thanks. Edit your answer so I can accept it

            – Nedko Dimitrov
            Nov 16 '18 at 12:11














          1












          1








          1







          Try to change in your webpack.config:



            entry: {
          app: path.resolve(__dirname, 'src/index.js'),
          print: path.resolve(__dirname, 'src/print.js'),
          sec: path.resolve(__dirname, 'src/secondClick.js')
          },


          And make sure you run the command from the project root with:
          npx webpack --config webpack.config.js






          share|improve this answer















          Try to change in your webpack.config:



            entry: {
          app: path.resolve(__dirname, 'src/index.js'),
          print: path.resolve(__dirname, 'src/print.js'),
          sec: path.resolve(__dirname, 'src/secondClick.js')
          },


          And make sure you run the command from the project root with:
          npx webpack --config webpack.config.js







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 16 '18 at 12:12

























          answered Nov 16 '18 at 11:56









          lependulependu

          724314




          724314













          • no luck with that and get the same error again

            – Nedko Dimitrov
            Nov 16 '18 at 11:57






          • 1





            what OS do you use? What is the pwd where you run the build command?

            – lependu
            Nov 16 '18 at 12:01











          • Ubuntu 16.04 I tried running it from the project's root and from within the dist folder

            – Nedko Dimitrov
            Nov 16 '18 at 12:02






          • 1





            Stay in the project root and try to run it with npx webpack --config webpack.config.js

            – lependu
            Nov 16 '18 at 12:09











          • That worked out thanks. Edit your answer so I can accept it

            – Nedko Dimitrov
            Nov 16 '18 at 12:11



















          • no luck with that and get the same error again

            – Nedko Dimitrov
            Nov 16 '18 at 11:57






          • 1





            what OS do you use? What is the pwd where you run the build command?

            – lependu
            Nov 16 '18 at 12:01











          • Ubuntu 16.04 I tried running it from the project's root and from within the dist folder

            – Nedko Dimitrov
            Nov 16 '18 at 12:02






          • 1





            Stay in the project root and try to run it with npx webpack --config webpack.config.js

            – lependu
            Nov 16 '18 at 12:09











          • That worked out thanks. Edit your answer so I can accept it

            – Nedko Dimitrov
            Nov 16 '18 at 12:11

















          no luck with that and get the same error again

          – Nedko Dimitrov
          Nov 16 '18 at 11:57





          no luck with that and get the same error again

          – Nedko Dimitrov
          Nov 16 '18 at 11:57




          1




          1





          what OS do you use? What is the pwd where you run the build command?

          – lependu
          Nov 16 '18 at 12:01





          what OS do you use? What is the pwd where you run the build command?

          – lependu
          Nov 16 '18 at 12:01













          Ubuntu 16.04 I tried running it from the project's root and from within the dist folder

          – Nedko Dimitrov
          Nov 16 '18 at 12:02





          Ubuntu 16.04 I tried running it from the project's root and from within the dist folder

          – Nedko Dimitrov
          Nov 16 '18 at 12:02




          1




          1





          Stay in the project root and try to run it with npx webpack --config webpack.config.js

          – lependu
          Nov 16 '18 at 12:09





          Stay in the project root and try to run it with npx webpack --config webpack.config.js

          – lependu
          Nov 16 '18 at 12:09













          That worked out thanks. Edit your answer so I can accept it

          – Nedko Dimitrov
          Nov 16 '18 at 12:11





          That worked out thanks. Edit your answer so I can accept it

          – Nedko Dimitrov
          Nov 16 '18 at 12:11




















          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%2f53337269%2fpath-js1086-error-enoent-no-such-file-or-directory-uv-cwd%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

          The Sandy Post

          Danny Elfman

          Pages that link to "Head v. Amoskeag Manufacturing Co."