Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Numerous errors with webpack webpack.config.js with latest #587

Closed
JohnGalt1717 opened this issue Jan 16, 2017 · 8 comments
Closed

Numerous errors with webpack webpack.config.js with latest #587

JohnGalt1717 opened this issue Jan 16, 2017 · 8 comments

Comments

@JohnGalt1717
Copy link

Errors on fsevents, nodefs-handler, and more with latest version of the yo generator and csproj based configuration.

@MarkPieszak
Copy link
Contributor

Are these errors or warnings?
Can you post them also?

@JohnGalt1717
Copy link
Author

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
-- webpack@1.14.0 +-- loader-utils@0.2.16 | -- object-assign@4.1.1
+-- node-libs-browser@0.7.0
| -- stream-http@2.6.2 +-- supports-color@3.2.3 -- webpack-core@0.6.9
`-- source-list-map@0.1.8

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 fsevents@1.0.17: 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

@JohnGalt1717
Copy link
Author

Actually:

webpack webpack.config.vendor.js

Will fail on cmd as well.

@KraigWalker
Copy link

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

@JohnGalt1717
Copy link
Author

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.

@SteveSandersonMS
Copy link
Member

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).

@JohnGalt1717
Copy link
Author

Head bang Sorry

@thorbaert
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants