npm init #eslint/config error & npx create-react-app . error - node.js

When i try to init a eslint config file for my node project with npm init #eslint/config. below is the error i am getting, I tried to downgrade node versio, upgrade npm to latest version, clear node cache nothing worked out.
Tried to google and could'nt find anything to this particular issue.
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Users\\sakth\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'init',
0 verbose cli '#eslint/config'
0 verbose cli ]
1 info using npm#8.5.3
2 info using node#v16.14.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\Users\sakth\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 3ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:D:\Projects\.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:C:\Users\sakth\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\sakth\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 11ms
19 timing npm:load:configload Completed in 11ms
20 timing npm:load:setTitle Completed in 1ms
21 timing config:load:flatten Completed in 3ms
22 timing npm:load:display Completed in 5ms
23 verbose logfile C:\Users\sakth\AppData\Local\npm-cache\_logs\2022-03-08T16_30_49_917Z-debug-0.log
24 timing npm:load:logFile Completed in 36ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 timing npm:load Completed in 53ms
28 silly logfile start cleaning logs, removing 4 files
29 http fetch GET 200 https://registry.npmjs.org/#eslint%2fcreate-config 2465ms (cache revalidated)
30 timing arborist:ctor Completed in 1ms
31 timing arborist:ctor Completed in 0ms
32 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules/acorn-jsx
33 timing command:init Completed in 2618ms
34 verbose stack Error: command failed
34 verbose stack at ChildProcess.<anonymous> (C:\Users\sakth\AppData\Roaming\npm\node_modules\npm\node_modules\#npmcli\promise-spawn\index.js:64:27)
34 verbose stack at ChildProcess.emit (node:events:520:28)
34 verbose stack at maybeClose (node:internal/child_process:1092:16)
34 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
35 verbose cwd D:\Projects
36 verbose Windows_NT 10.0.19044
37 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sakth\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "init" "#eslint/config"
38 verbose node v16.14.0
39 verbose npm v8.5.3
40 error code 1
41 error path D:\Projects
42 error command failed
43 error command C:\Windows\system32\cmd.exe /d /s /c create-config
44 verbose exit 1
45 timing npm Completed in 3315ms
46 verbose code 1
47 error A complete log of this run can be found in:
47 error C:\Users\sakth\AppData\Local\npm-cache\_logs\2022-03-08T16_30_49_917Z-debug-0.log
And for npx create-react-app .
'create-react-app' is not recognized as an internal or external command,
operable program or batch file.

are you using the newer npx command for create-react-app? from the docs :
npx create-react-app my-app cd my-app npm start
If you've previously installed create-react-app globally via npm
install -g create-react-app, we recommend you uninstall the package
using npm uninstall -g create-react-app or yarn global remove
create-react-app to ensure that npx always uses the latest version.

Related

npm init #eslint/config error & npx create-react-app my-app error

Hi all I am new to react/node. I tried to learn these by following the tutorial guide.
It was successful to build a new react project and install eslint on the first try.
However, there was an accident so I have to restore my PC and re-install my VS code and node.js.
Then I tried to build a new react project again but it failed.
PS C:\Users\JUI> npx create-react-app my-app
'create-react-app' is not recognized as an internal or external command,
operable program or batch file.
I know that npm install -g create-react-app then npm create-react-app my-app would succeed to create but I wonder why npx would fail.
After that I tried to install expo npm install --global expo-cli to create a new react native app expo init Ahjuisingyen and its success. Then I tried to install eslint into my project but it failed.
PS C:\Users\JUI\Ahjuisingyen> eslint --init
You can also run this command directly using 'npm init #eslint/config'.
'create-config' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code 1
npm ERR! path C:\Users\JUI\Ahjuisingyen
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c create-config
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\JUI\AppData\Local\npm-cache\_logs\2022-03-30T03_44_34_043Z-debug-0.log
C:\Users\JUI\AppData\Local\npm-cache_logs\2022-03-30T03_44_34_043Z-debug-0.log
0 verbose cli [
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'init',
0 verbose cli '#eslint/config'
0 verbose cli ]
1 info using npm#8.5.0
2 info using node#v16.14.2
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:C:\Users\JUI\Ahjuisingyen\.npmrc Completed in 1ms
10 timing config:load:project Completed in 6ms
11 timing config:load:file:C:\Users\JUI\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\JUI\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 14ms
19 timing npm:load:configload Completed in 14ms
20 timing npm:load:setTitle Completed in 0ms
21 timing config:load:flatten Completed in 2ms
22 timing npm:load:display Completed in 4ms
23 verbose logfile C:\Users\JUI\AppData\Local\npm-cache\_logs\2022-03-30T03_44_34_043Z-debug-0.log
24 timing npm:load:logFile Completed in 5ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 timing npm:load Completed in 24ms
28 silly logfile start cleaning logs, removing 2 files
29 http fetch GET 200 https://registry.npmjs.org/#eslint%2fcreate-config 119ms (cache revalidated)
30 timing arborist:ctor Completed in 1ms
31 timing arborist:ctor Completed in 0ms
32 timing arborist:ctor Completed in 0ms
33 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules/ajv
34 timing command:init Completed in 659ms
35 verbose stack Error: command failed
35 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\promise-spawn\index.js:64:27)
35 verbose stack at ChildProcess.emit (node:events:526:28)
35 verbose stack at maybeClose (node:internal/child_process:1092:16)
35 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
36 verbose pkgid ahjuisingyen#1.0.0
37 verbose cwd C:\Users\JUI\Ahjuisingyen
38 verbose Windows_NT 10.0.19044
39 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "init" "#eslint/config"
40 verbose node v16.14.2
41 verbose npm v8.5.0
42 error code 1
43 error path C:\Users\JUI\Ahjuisingyen
44 error command failed
45 error command C:\WINDOWS\system32\cmd.exe /d /s /c create-config
46 verbose exit 1
47 timing npm Completed in 993ms
48 verbose code 1
49 error A complete log of this run can be found in:
49 error C:\Users\JUI\AppData\Local\npm-cache\_logs\2022-03-30T03_44_34_043Z-debug-0.log
Other references that may be useful:
PS C:\Users\JUI\Ahjuisingyen> npm ls -g
C:\Users\JUI\AppData\Roaming\npm
└── expo-cli#5.3.0
PS C:\Users\JUI\Ahjuisingyen> node -v
v16.14.2
PS C:\Users\JUI\Ahjuisingyen> npm -v
8.5.0
PS C:\Users\JUI\Ahjuisingyen> npx -v
8.5.0
I googled and tried every method but still no luck. Not sure if these two questions are related so I just put them together. Any help would be appreciated. Thanks.

react development server not starting

I make a react app using the command "npx create-react-app" and I try to start the development server without doing any changes to it using "npm start" and it ends with this error
picture: https://i.stack.imgur.com/r28sS.png
and this is the log file
0 verbose cli [
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'start'
0 verbose cli ]
1 info using npm#8.1.0
2 info using node#v16.13.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 3ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:T:\t\Projects\React.js\.npmrc Completed in 1ms
10 timing config:load:project Completed in 3ms
11 timing config:load:file:C:\Users\thevi\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\thevi\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 14ms
19 timing npm:load:configload Completed in 14ms
20 timing npm:load:setTitle Completed in 0ms
21 timing npm:load:setupLog Completed in 0ms
22 timing config:load:flatten Completed in 4ms
23 timing npm:load:cleanupLog Completed in 7ms
24 timing npm:load:configScope Completed in 0ms
25 timing npm:load:projectScope Completed in 1ms
26 timing npm:load Completed in 31ms
27 timing command:run-script Completed in 3ms
28 timing command:start Completed in 16ms
29 verbose stack Error: ENOENT: no such file or directory, open 'T:\t\Projects\React.js\package.json'
30 verbose cwd T:\t\Projects\React.js
31 verbose Windows_NT 10.0.22000
32 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
33 verbose node v16.13.0
34 verbose npm v8.1.0
35 error code ENOENT
36 error syscall open
37 error path T:\t\Projects\React.js/package.json
38 error errno -4058
39 error enoent ENOENT: no such file or directory, open 'T:\t\Projects\React.js\package.json'
40 error enoent This is related to npm not being able to find a file.
41 verbose exit -4058
You should first go to your project directory, in your case it is called anatha_1.
So, run cd anatha_1, then npm start.
npm start or any other npm script, looks for the package.json file in the current working directory.
It is also what is written by create-react-app at the end of its output, so please follow the guidelines.

`npm deploy` missing script error when setting up deployment to GitHub pages

I'm trying to deploy my local react app to GitHub pages following these instructions: https://blog.logrocket.com/8-ways-to-deploy-a-react-app-for-free/
I added the scripts to packages.json as indicated, but when I go to npm run deploy, I get this error:
MBP roo % npm run deploy
npm ERR! Missing script: "deploy"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/reallymemorable/.npm/_logs/2021-10-26T15_38_56_012Z-debug.log
I even went ahead and ran npm install deploy just in case (even though it was indicated in the tutorial).
Same error.
This is what in the log file when I cat it:
MBP roo % cat /Users/reallymemorable/.npm/_logs/2021-10-26T15_38_56_012Z-debug.log
0 verbose cli [
0 verbose cli '/opt/homebrew/Cellar/node/17.0.1/bin/node',
0 verbose cli '/opt/homebrew/bin/npm',
0 verbose cli 'run',
0 verbose cli 'deploy'
0 verbose cli ]
1 info using npm#8.1.0
2 info using node#v17.0.1
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/opt/homebrew/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:/Users/reallymemorable/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/opt/homebrew/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:validate Completed in 0ms
15 timing config:load:credentials Completed in 0ms
16 timing config:load:setEnvs Completed in 1ms
17 timing config:load Completed in 5ms
18 timing npm:load:configload Completed in 5ms
19 timing npm:load:setTitle Completed in 2ms
20 timing npm:load:setupLog Completed in 0ms
21 timing config:load:flatten Completed in 2ms
22 timing npm:load:cleanupLog Completed in 1ms
23 timing npm:load:configScope Completed in 0ms
24 timing npm:load:projectScope Completed in 1ms
25 timing npm:load Completed in 11ms
26 timing command:run-script Completed in 4ms
27 verbose stack Error: Missing script: "deploy"
27 verbose stack
27 verbose stack To see a list of scripts, run:
27 verbose stack npm run
27 verbose stack at RunScript.run (/opt/homebrew/lib/node_modules/npm/lib/run-script.js:105:13)
28 verbose cwd /Users/reallymemorable/git/roo
29 verbose Darwin 20.6.0
30 verbose argv "/opt/homebrew/Cellar/node/17.0.1/bin/node" "/opt/homebrew/bin/npm" "run" "deploy"
31 verbose node v17.0.1
32 verbose npm v8.1.0
33 error Missing script: "deploy"
33 error
33 error To see a list of scripts, run:
33 error npm run
34 verbose exit 1
How can I get access to the deploy script? Does this have something to do with my node version? (I installed it with brew install node, so I have the latest version.)
Problem solved. I was not cded into the right directory when I ran the command...

Node Error "unable to resolve dependency tree" while installing tailwindcss --auth

I tried to install Tailwind UI Auth with php artisan ui tailwindcss --auth command. Both CSS Scaffolding and CSS auth Scaffolding were installed successfully and I ran the command npm install && npm run dev to compile the fresh scaffolding. NPM installation happend but in the dev process of the command, the app was not properly compiled. The error log as follows;
> 0 verbose cli [
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'install'
0 verbose cli ]
1 info using npm#7.11.2
2 info using node#v16.1.0
3 timing npm:load:whichnode Completed in 2ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 4ms
6 timing config:load:builtin Completed in 4ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:E:\Google Drive\laravel_training\secondproject\.npmrc Completed in 0ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:C:\Users\Charles-MS\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\Charles-MS\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 2ms
18 timing config:load Completed in 14ms
19 timing npm:load:configload Completed in 14ms
20 timing npm:load:setTitle Completed in 0ms
21 timing npm:load:setupLog Completed in 1ms
22 timing npm:load:cleanupLog Completed in 3ms
23 timing npm:load:configScope Completed in 0ms
24 timing npm:load:projectScope Completed in 1ms
25 timing npm:load Completed in 22ms
26 timing config:load:flatten Completed in 4ms
27 timing arborist:ctor Completed in 4ms
28 timing idealTree:init Completed in 1291ms
29 timing idealTree:userRequests Completed in 0ms
30 silly idealTree buildDeps
31 silly fetch manifest #tailwindcss/ui#^0.3
32 http fetch GET 304 https://registry.npmjs.org/#tailwindcss%2fui 3735ms (from cache)
33 silly fetch manifest tailwindcss#^2.1.2
34 http fetch GET 200 https://registry.npmjs.org/tailwindcss 708ms
35 silly fetch manifest tailwindcss#^1.3.3
36 silly fetch manifest autoprefixer#^9.6
37 http fetch GET 304 https://registry.npmjs.org/autoprefixer 256ms (from cache)
38 silly fetch manifest autoprefixer#^10.0.2
39 timing idealTree Completed in 6018ms
40 timing command:install Completed in 6032ms
41 verbose stack Error: unable to resolve dependency tree
41 verbose stack at Arborist.[failPeerConflict] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:1221:25)
41 verbose stack at Arborist.[loadPeerSet] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:1188:34)
41 verbose stack at async Arborist.[loadPeerSet] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:1175:23)
41 verbose stack at async Arborist.[buildDepStep] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:892:11)
41 verbose stack at async Arborist.buildIdealTree (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:218:7)
41 verbose stack at async Promise.all (index 1)
41 verbose stack at async Arborist.reify (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\reify.js:135:5)
41 verbose stack at async Install.install (C:\Program Files\nodejs\node_modules\npm\lib\install.js:137:5)
42 verbose cwd E:\Google Drive\laravel_training\secondproject
43 verbose Windows_NT 10.0.19042
44 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
45 verbose node v16.1.0
46 verbose npm v7.11.2
47 error code ERESOLVE
48 error ERESOLVE unable to resolve dependency tree
49 error
50 error While resolving: [1mundefined[22m#[1mundefined[22m
50 error Found: [1mautoprefixer[22m#[1m9.8.6[22m[2m[22m
50 error [2mnode_modules/autoprefixer[22m
50 error [33mdev[39m [1mautoprefixer[22m#"[1m^9.6[22m" from the root project
50 error
50 error Could not resolve dependency:
50 error [35mpeer[39m [1mautoprefixer[22m#"[1m^10.0.2[22m" from [1mtailwindcss[22m#[1m2.1.2[22m[2m[22m
50 error [2mnode_modules/tailwindcss[22m
50 error [1mtailwindcss[22m#"[1m^2.1.2[22m" from the root project
50 error
50 error Fix the upstream dependency conflict, or retry
50 error this command with --force, or --legacy-peer-deps
50 error to accept an incorrect (and potentially broken) dependency resolution.
50 error
50 error See C:\Users\Charles-MS\AppData\Local\npm-cache\eresolve-report.txt for a full report.
51 verbose exit 1
How to overcome this error? Even I updated node to latest version (v16.1.0) but coudn't fix the error...
The following solution worked for me;
Run the command npm audit fix --force which updates laravel-mix to 6.0.19, a SemVer major change. Then run npm run dev which will successfully compile the webpack. This error occurs due to an outdated laravel-mix package.

Segmentation fault (core dumped) Error 139 (Webpack 5.11.1)

I've started creating a small educational project using Webpack:
https://github.com/Ray-Garraty/frontend-project-lvl3
When I try to make an initial build, I get the following error message:
Segmentation fault (core dumped)
npm ERR! code 139
npm ERR! path /home/ray-garraty/Documents/frontend-project-lvl3
npm ERR! command failed
npm ERR! command sh -c webpack
Here's the complete error log:
0 verbose cli [
0 verbose cli '/home/ray-garraty/.nvm/versions/node/v15.5.0/bin/node',
0 verbose cli '/home/ray-garraty/.nvm/versions/node/v15.5.0/lib/node_modules/npm/bin/npm-cli.js',
0 verbose cli 'exec',
0 verbose cli '--',
0 verbose cli 'webpack'
0 verbose cli ]
1 info using npm#7.3.0
2 info using node#v15.5.0
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/home/ray-garraty/.nvm/versions/node/v15.5.0/lib/node_modules /npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/home/ray-garraty/Documents/frontend-project-lvl3/.npmrc Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:/home/ray-garraty/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/home/ray-garraty/.nvm/versions/node/v15.5.0/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 1ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 6ms
19 verbose npm-session 7306a5ca90c48dfe
20 timing npm:load Completed in 12ms
21 timing command:exec Completed in 296ms
22 verbose stack Error: command failed
22 verbose stack at ChildProcess.<anonymous> (/home/ray-garraty/.nvm/versions/node/v15.5.0/lib/node_modules/npm/node_modules/#npmcli/promise-spawn/index.js:64:27)
22 verbose stack at ChildProcess.emit (node:events:376:20)
22 verbose stack at maybeClose (node:internal/child_process:1063:16)
22 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
23 verbose pkgid #hexlet/code#1.0.0
24 verbose cwd /home/ray-garraty/Documents/frontend-project-lvl3
25 verbose Linux 5.4.0-58-generic
26 verbose argv "/home/ray-garraty/.nvm/versions/node/v15.5.0/bin/node" "/home/ray-garraty /.nvm/versions/node/v15.5.0/lib/node_modules/npm/bin/npm-cli.js" "exec" "--" "webpack"
27 verbose node v15.5.0
28 verbose npm v7.3.0
29 error code 139
30 error path /home/ray-garraty/Documents/frontend-project-lvl3
31 error command failed
32 error command sh -c webpack
33 verbose exit 139
Is there a problem with my Webpack config, or maybe smth else?
P.S.: I've tried reinstalling nvm, deleting and reinstalling the node_modules folder and rebuilding dependencies, tried to run it under different node.js versions, but it didn't work.
Well, the problem was caused by the wrong webpack config file extension:
it should be webpack.config.cjs, not webpack.config.js
Source: https://github.com/webpack/webpack/issues/12308

Resources