Error: Cannot find module ‘process-nextick-args’

1. Error description

C:\Users\Administrator>cd cma

C:\Users\Administrator\cma>webpack you.js today.js
C:\Users\Administrator\node_modules\webpack-cli\bin\webpack.js:449
                                throw err;
                                ^

Error: Cannot find module 'process-nextick-args'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
    at Function.Module._load (internal/modules/cjs/loader.js:497:25)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (C:\Users\Administrator\node_modules\v8-compile-cache\v8-compile-
cache.js:159:20)
    at Object.<anonymous> (C:\Users\Administrator\node_modules\_readable-stream@
2.3.6@readable-stream\lib\_stream_readable.js:26:11)
    at Module._compile (C:\Users\Administrator\node_modules\v8-compile-cache\v8-
compile-cache.js:178:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (C:\Users\Administrator\node_modules\v8-compile-cache\v8-compile-
cache.js:159:20)
    at Object.<anonymous> (C:\Users\Administrator\node_modules\_readable-stream@
2.3.6@readable-stream\readable.js:12:30)
    at Module._compile (C:\Users\Administrator\node_modules\v8-compile-cache\v8-
compile-cache.js:178:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (C:\Users\Administrator\node_modules\v8-compile-cache\v8-compile-
cache.js:159:20)
    at Object.<anonymous> (C:\Users\Administrator\node_modules\[email protected]@
duplexify\index.js:1:76)
    at Module._compile (C:\Users\Administrator\node_modules\v8-compile-cache\v8-
compile-cache.js:178:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (C:\Users\Administrator\node_modules\v8-compile-cache\v8-compile-
cache.js:159:20)
    at Object.<anonymous> (C:\Users\Administrator\node_modules\[email protected]@pu
mpify\index.js:3:17)
    at Module._compile (C:\Users\Administrator\node_modules\v8-compile-cache\v8-
compile-cache.js:178:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (C:\Users\Administrator\node_modules\v8-compile-cache\v8-compile-
cache.js:159:20)
    at Object.<anonymous> (C:\Users\Administrator\node_modules\[email protected].
0@mississippi\index.js:3:27)
    at Module._compile (C:\Users\Administrator\node_modules\v8-compile-cache\v8-
compile-cache.js:178:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)

C:\Users\Administrator\cma>

2. Cause of error

When prompted that the relevant JSON file is missing, execute the cnpm install — save dev webpack installation command, and then switch to the specified folder again to you.js The above error occurred when packaging.

3. Solutions

Run “cnpm install — save process next args”

C:\Users\Administrator>cnpm install --save process-nextick-args
√ Installed 1 packages
√ Linked 0 latest versions
√ Run 0 scripts
√ All packages installed (1 packages installed from npm registry, used 236ms, s
peed 13.95kB/s, json 1(3.29kB), tarball 0B)

Read More: