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;
}
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:

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
add a comment |
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:

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
add a comment |
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:

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
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:

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
node.js npm webpack
asked Nov 16 '18 at 11:47
Nedko DimitrovNedko Dimitrov
583816
583816
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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
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 thepwdwhere 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 withnpx 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
|
show 1 more comment
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
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 thepwdwhere 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 withnpx 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
|
show 1 more comment
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
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 thepwdwhere 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 withnpx 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
|
show 1 more comment
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
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
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 thepwdwhere 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 withnpx 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
|
show 1 more comment
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 thepwdwhere 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 withnpx 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
|
show 1 more comment
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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