Errors on fsevents, nodefs-handler, and more with latest version of the yo generator and csproj based configuration.
Are these errors or warnings?
Can you post them also?
Appears it may be powershell only related?
PS C:> webpack webpack.config.js
Hash: bb89ba4d65a32e77eeba70a7b2d713a46ab50ed2
Version: webpack 1.14.0
Child
Hash: bb89ba4d65a32e77eeba
Version: webpack 1.14.0
Time: 15332ms
Asset Size Chunks Chunk Names
main.js 1.4 MB 0 [emitted] main
main-client.js 20.7 kB 1 [emitted] main-client
main.js.map 1.71 MB 0 [emitted] main
main-client.js.map 24.3 kB 1 [emitted] main-client
[0] ./webpack.config.js 2.74 kB {0} [built]
+ 375 hidden modules
WARNING in ./~/chokidar/lib/fsevents-handler.js
Module not found: Error: Cannot resolve module 'fsevents' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_mod
es\chokidar\lib
@ ./~/chokidar/lib/fsevents-handler.js 7:17-36
ERROR in (webpack)/lib/node/NodeMainTemplateAsync.runtime.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\w
pack\lib\node
@ (webpack)/lib/node/NodeMainTemplateAsync.runtime.js 9:2-15 24:2-15
ERROR in ./~/uglify-js/tools/node.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\u
ify-js\tools
@ ./~/uglify-js/tools/node.js 8:9-22
ERROR in (webpack)/lib/node/NodeOutputFileSystem.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\w
pack\lib\node
@ (webpack)/lib/node/NodeOutputFileSystem.js 5:9-22
ERROR in (webpack)/lib/node/OldNodeWatchFileSystem.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\w
pack\lib\node
@ (webpack)/lib/node/OldNodeWatchFileSystem.js 5:9-22
ERROR in ./~/mkdirp/index.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\m
irp
@ ./~/mkdirp/index.js 2:9-22
ERROR in ./~/graceful-fs/graceful-fs.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\g
ceful-fs
@ ./~/graceful-fs/graceful-fs.js 1:9-22
ERROR in ./~/graceful-fs/fs.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\g
ceful-fs
@ ./~/graceful-fs/fs.js 3:9-22
ERROR in ./~/chokidar/index.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\c
kidar
@ ./~/chokidar/index.js 3:9-22
ERROR in ./~/chokidar/lib/nodefs-handler.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\c
kidar\lib
@ ./~/chokidar/lib/nodefs-handler.js 3:9-22
ERROR in ./~/chokidar/lib/fsevents-handler.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\c
kidar\lib
@ ./~/chokidar/lib/fsevents-handler.js 3:9-22
Child
Hash: 70a7b2d713a46ab50ed2
Version: webpack 1.14.0
Time: 15193ms
Asset Size Chunks Chunk Names
main.js 5.29 MB 0 [emitted] main
main-server.js 50.2 kB 1 [emitted] main-server
[0] ./webpack.config.js 2.74 kB {0} [built]
+ 521 hidden modules
WARNING in (webpack)/lib/webpack.js
Critical dependencies:
62:11-37 the request of a dependency is an expression
@ (webpack)/lib/webpack.js 62:11-37
WARNING in ./~/chokidar/lib/fsevents-handler.js
Module not found: Error: Cannot resolve module 'fsevents' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_mod
es\chokidar\lib
@ ./~/chokidar/lib/fsevents-handler.js 7:17-36
PS C:\Repos\CAdlearning\Blogs\CADLearning.Blogs> npm install -g webpack
C:\Users\jhancock.CADLEARNING\AppData\Roaming\npm\webpack -> C:\Users\jhancock.CADLEARNING\AppData\Roaming\npm\node_mo
les\webpack\bin\webpack.js
C:\Users\jhancock.CADLEARNING\AppData\Roaming\npm
-- [email protected]
+-- [email protected]
|-- [email protected]
+-- [email protected]
| -- [email protected]
+-- [email protected]
-- [email protected]
`-- [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\webpack\node_modules\chokidar\node_modul
\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"
y"} (current: {"os":"win32","arch":"x64"})
PS C:\Repos\CAdlearning\Blogs\CADLearning.Blogs> webpack webpack.config.js
Hash: bb89ba4d65a32e77eeba70a7b2d713a46ab50ed2
Version: webpack 1.14.0
Child
Hash: bb89ba4d65a32e77eeba
Version: webpack 1.14.0
Time: 15947ms
Asset Size Chunks Chunk Names
main.js 1.4 MB 0 [emitted] main
main-client.js 20.7 kB 1 [emitted] main-client
main.js.map 1.71 MB 0 [emitted] main
main-client.js.map 24.3 kB 1 [emitted] main-client
[0] ./webpack.config.js 2.74 kB {0} [built]
+ 375 hidden modules
WARNING in ./~/chokidar/lib/fsevents-handler.js
Module not found: Error: Cannot resolve module 'fsevents' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_mod
es\chokidar\lib
@ ./~/chokidar/lib/fsevents-handler.js 7:17-36
ERROR in (webpack)/lib/node/NodeMainTemplateAsync.runtime.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\w
pack\lib\node
@ (webpack)/lib/node/NodeMainTemplateAsync.runtime.js 9:2-15 24:2-15
ERROR in ./~/uglify-js/tools/node.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\u
ify-js\tools
@ ./~/uglify-js/tools/node.js 8:9-22
ERROR in (webpack)/lib/node/NodeOutputFileSystem.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\w
pack\lib\node
@ (webpack)/lib/node/NodeOutputFileSystem.js 5:9-22
ERROR in (webpack)/lib/node/OldNodeWatchFileSystem.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\w
pack\lib\node
@ (webpack)/lib/node/OldNodeWatchFileSystem.js 5:9-22
ERROR in ./~/mkdirp/index.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\m
irp
@ ./~/mkdirp/index.js 2:9-22
ERROR in ./~/graceful-fs/graceful-fs.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\g
ceful-fs
@ ./~/graceful-fs/graceful-fs.js 1:9-22
ERROR in ./~/graceful-fs/fs.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\g
ceful-fs
@ ./~/graceful-fs/fs.js 3:9-22
ERROR in ./~/chokidar/index.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\c
kidar
@ ./~/chokidar/index.js 3:9-22
ERROR in ./~/chokidar/lib/nodefs-handler.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\c
kidar\lib
@ ./~/chokidar/lib/nodefs-handler.js 3:9-22
ERROR in ./~/chokidar/lib/fsevents-handler.js
Module not found: Error: Cannot resolve module 'fs' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_modules\c
kidar\lib
@ ./~/chokidar/lib/fsevents-handler.js 3:9-22
Child
Hash: 70a7b2d713a46ab50ed2
Version: webpack 1.14.0
Time: 15793ms
Asset Size Chunks Chunk Names
main.js 5.29 MB 0 [emitted] main
main-server.js 50.2 kB 1 [emitted] main-server
[0] ./webpack.config.js 2.74 kB {0} [built]
+ 521 hidden modules
WARNING in (webpack)/lib/webpack.js
Critical dependencies:
62:11-37 the request of a dependency is an expression
@ (webpack)/lib/webpack.js 62:11-37
WARNING in ./~/chokidar/lib/fsevents-handler.js
Module not found: Error: Cannot resolve module 'fsevents' in C:\Repos\CAdlearning\Blogs\CADLearning.Blogs\node_mod
es\chokidar\lib
@ ./~/chokidar/lib/fsevents-handler.js 7:17-36
Actually:
webpack webpack.config.vendor.js
Will fail on cmd as well.
I'm having this issue as well,
In my webpack.config files I added the following to my configs.
Bear in mind the example repos have both a server config and a clinet config in the same webpack files, so you'll need to add this to both.
node: {
fs: "empty"
},
I'm still a bit baffled why this even happened though, it was working okay until... yesterday? :/
I tried this and then promptly got endless other errors (it appears to fix that one) even with the default template and no changes at all.
The command isn't webpack webpack.config.js.
It's webpack --config webpack.config.js :)
(Or just run webpack with no args, which defaults to a config file called webpack.config.js).
Head bang Sorry
For those who encounter this error I've found that running webpack from the node_modules webpack and not the global webpack works just fine
node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js
&
node node_modules/webpack/bin/webpack.js --config webpack.config.js
Most helpful comment
The command isn't
webpack webpack.config.js.It's
webpack --config webpack.config.js:)(Or just run
webpackwith no args, which defaults to a config file calledwebpack.config.js).