Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack5 | Module not found: Error: Can't resolve 'fs' #85

Closed
gongjf1982 opened this issue Apr 4, 2022 · 0 comments
Closed

webpack5 | Module not found: Error: Can't resolve 'fs' #85

gongjf1982 opened this issue Apr 4, 2022 · 0 comments

Comments

@gongjf1982
Copy link

PS D:\Snap7-learner> webpack -v
webpack: 5.71.0
webpack-cli: 4.9.2
webpack-dev-server not installed
PS D:\Snap7-learner> webpack
assets by status 607 bytes [cached] 1 asset
asset js/build.js 67.1 KiB [compared for emit] (name: main)
asset favicon.ico 5.3 KiB [compared for emit] [from: favicon.ico] [copied]
asset index.html 453 bytes [compared for emit]
runtime modules 221 bytes 1 module
modules by path ./node_modules/ 56.9 KiB
modules by path ./node_modules/_util@0.10.4@util/ 15.4 KiB
./node_modules/_util@0.10.4@util/util.js 15.2 KiB [built] [code generated]
./node_modules/_util@0.10.4@util/support/isBufferBrowser.js 203 bytes [built] [code generated]
./node_modules/[email protected]@node-snap7/lib/node-snap7.js 2.12 KiB [built] [code generated]
./node_modules/events/events.js 14.5 KiB [built] [code generated]
./node_modules/_bindings@1.5.0@bindings/bindings.js 5.85 KiB [built] [code generated]
./node_modules/_path@0.12.7@path/path.js 16.7 KiB [built] [code generated]
./node_modules/_file-uri-to-path@1.0.0@file-uri-to-path/index.js 1.68 KiB [built] [code generated]
./node_modules/_inherits@2.0.3@inherits/inherits_browser.js 672 bytes [built] [code generated]
./src/js/index.js 607 bytes [built] [code generated]

ERROR in ./node_modules/_bindings@1.5.0@bindings/bindings.js 5:9-22
Module not found: Error: Can't resolve 'fs' in 'D:\Snap7-learner\node_modules_bindings@1.5.0@bindings'
resolve 'fs' in 'D:\Snap7-learner\node_modules_bindings@1.5.0@bindings'
Parsed request is a module
using description file: D:\Snap7-learner\node_modules_bindings@1.5.0@bindings\package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
looking for modules in D:\Snap7-learner\node_modules_bindings@1.5.0@bindings\node_modules
single file module
using description file: D:\Snap7-learner\node_modules_bindings@1.5.0@bindings\package.json (relative path: ./node_modules/fs)
no extension
Field 'browser' doesn't contain a valid alias configuration
D:\Snap7-learner\node_modules_bindings@1.5.0@bindings\node_modules\fs doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
D:\Snap7-learner\node_modules_bindings@1.5.0@bindings\node_modules\fs.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
D:\Snap7-learner\node_modules_bindings@1.5.0@bindings\node_modules\fs.js doesn't exist
D:\Snap7-learner\node_modules_bindings@1.5.0@bindings\node_modules\fs doesn't exist
D:\Snap7-learner\node_modules\node_modules doesn't exist or is not a directory
looking for modules in D:\Snap7-learner\node_modules
single file module
using description file: D:\Snap7-learner\package.json (relative path: ./node_modules/fs)
no extension
Field 'browser' doesn't contain a valid alias configuration
D:\Snap7-learner\node_modules\fs doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
D:\Snap7-learner\node_modules\fs.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
D:\Snap7-learner\node_modules\fs.js doesn't exist
D:\Snap7-learner\node_modules\fs doesn't exist
D:\node_modules doesn't exist or is not a directory
@ ./node_modules/[email protected]@node-snap7/lib/node-snap7.js 8:25-44
@ ./src/js/index.js 3:12-33

webpack 5.71.0 compiled with 1 error in 937 ms
PS D:\Snap7-learner>

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

No branches or pull requests

1 participant