spencermountain / unrequired

find unused javascript files in your project
108 stars 8 forks source link

issue w/ _tmp-build.js.map #10

Closed mattiaerre closed 4 years ago

mattiaerre commented 4 years ago

Description

I'm trying to run the following command:

npx unrequired app.js

and this is what I get as an output:

Compiling the javascript..

(!) Plugin node-resolve: preferring built-in module 'util' over local alternative at '/Users/mrichetto/projects/menus-service-sync/node_modules/util/util.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'path' over local alternative at 'path', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'fs' over local alternative at 'fs', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'os' over local alternative at 'os', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'crypto' over local alternative at 'crypto', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'querystring' over local alternative at '/Users/mrichetto/projects/menus-service-sync/node_modules/querystring/index.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'vm' over local alternative at 'vm', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'module' over local alternative at 'module', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'stream' over local alternative at 'stream', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'child_process' over local alternative at 'child_process', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/Users/mrichetto/projects/menus-service-sync/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'domain' over local alternative at 'domain', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'dgram' over local alternative at 'dgram', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'http' over local alternative at 'http', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'net' over local alternative at 'net', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'https' over local alternative at 'https', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'buffer' over local alternative at '/Users/mrichetto/projects/menus-service-sync/node_modules/buffer/index.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'url' over local alternative at '/Users/mrichetto/projects/menus-service-sync/node_modules/url/url.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'dns' over local alternative at 'dns', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Plugin node-resolve: preferring built-in module 'zlib' over local alternative at 'zlib', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
(!) Unresolved dependencies
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
util (imported by app.js, util?commonjs-external, node_modules/config/lib/config.js, node_modules/mongodb/lib/aggregation_cursor.js, node_modules/mongodb/lib/mongo_client.js, node_modules/mongodb/lib/cursor.js, node_modules/mongodb/lib/db.js, node_modules/mongodb/lib/gridfs-stream/index.js, node_modules/mongodb/lib/gridfs/grid_store.js, node_modules/hoek/lib/index.js, node_modules/mongodb/lib/collection.js, node_modules/mongodb/lib/topologies/topology_base.js, node_modules/mongodb/lib/operations/connect.js, node_modules/mongodb/lib/gridfs-stream/download.js, node_modules/mongodb/lib/gridfs-stream/upload.js, node_modules/request/index.js, node_modules/mongodb/lib/core/connection/logger.js, node_modules/mongodb/lib/core/topologies/server.js, node_modules/mongodb/lib/core/topologies/mongos.js, node_modules/mongodb/lib/core/sdam/topology.js, node_modules/mongodb/lib/core/topologies/replset.js, node_modules/require_optional/index.js, node_modules/aws-sdk/lib/event_listeners.js, node_modules/request/request.js, node_modules/mongodb/lib/url_parser.js)
yaml (imported by node_modules/config/lib/config.js, yaml?commonjs-external)
hjson (imported by node_modules/config/lib/config.js, hjson?commonjs-external)
toml (imported by node_modules/config/lib/config.js, toml?commonjs-external)
properties (imported by node_modules/config/lib/config.js, properties?commonjs-external)
iced-coffee-script (imported by node_modules/config/lib/config.js, iced-coffee-script?commonjs-external)
cson (imported by node_modules/config/lib/config.js, cson?commonjs-external)
path (imported by node_modules/config/lib/config.js, path?commonjs-external, node_modules/coffee-script/lib/coffee-script/coffee-script.js, node_modules/recursive-readdir/index.js, node_modules/hoek/lib/index.js, node_modules/hapi/lib/server.js, node_modules/hapi/lib/connection.js, node_modules/require_optional/index.js, node_modules/coffee-script/lib/coffee-script/parser.js, node_modules/aws-sdk/lib/shared-ini/ini-loader.js, node_modules/shelljs/src/pwd.js, node_modules/shelljs/src/ls.js, node_modules/shelljs/src/mkdir.js, node_modules/shelljs/src/mv.js, node_modules/shelljs/src/to.js, node_modules/shelljs/src/toEnd.js, node_modules/shelljs/src/dirs.js, node_modules/shelljs/src/which.js, node_modules/shelljs/src/exec.js, node_modules/shelljs/src/ln.js, node_modules/shelljs/src/chmod.js, node_modules/shelljs/src/cp.js, node_modules/ot-hapi-service-status/node_modules/hoek/lib/index.js)
fs (imported by node_modules/config/lib/config.js, fs?commonjs-external, node_modules/coffee-script/lib/coffee-script/coffee-script.js, node_modules/recursive-readdir/index.js, node_modules/statsd-client/lib/statsd-client.js, node_modules/mongodb/lib/gridfs/grid_store.js, node_modules/require_optional/index.js, node_modules/coffee-script/lib/coffee-script/parser.js, node_modules/aws-sdk/lib/credentials/token_file_web_identity_credentials.js, node_modules/aws-sdk/lib/util.js, node_modules/shelljs/src/common.js, node_modules/shelljs/src/cd.js, node_modules/shelljs/src/ls.js, node_modules/shelljs/src/rm.js, node_modules/shelljs/src/mkdir.js, node_modules/shelljs/src/mv.js, node_modules/shelljs/src/test.js, node_modules/shelljs/src/to.js, node_modules/shelljs/src/cat.js, node_modules/shelljs/src/sed.js, node_modules/shelljs/src/toEnd.js, node_modules/shelljs/src/grep.js, node_modules/shelljs/src/which.js, node_modules/shelljs/src/exec.js, node_modules/shelljs/src/tempdir.js, node_modules/shelljs/src/ln.js, node_modules/shelljs/src/chmod.js, node_modules/shelljs/src/cp.js, node_modules/shelljs/src/find.js)
ENOENT: no such file or directory, open '/Users/mrichetto/projects/menus-service-sync/node_modules/unrequired/_tmp-build.js.map'

in particular the last line:

ENOENT: no such file or directory, open '/Users/mrichetto/projects/menus-service-sync/node_modules/unrequired/_tmp-build.js.map'

any idea why? thanks so much, -Mattia

mattiaerre commented 4 years ago

It actually worked but I had to rm -rf node_modules first. Feel free to close this issue if this is not a problem. Thanks again. -Mattia