Outlook 加载项的 Node.js 使用 Bcrypt 错误?

问题描述 投票:0回答:0

我正在创建一个 Outlook 加载项并在我的应用程序上使用 bcrypt,我需要我的 taskpane.js 文件上的模块但是当我运行命令

npm run build
它给了我下面的error,我可以'由于帖子限制,请不要粘贴所有错误行。

 @ ./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js 86:13-36 291:36-53
 @ ./node_modules/bcrypt/bcrypt.js 3:17-48
 @ ./src/taskpane/taskpane.js 11:13-30

ERROR in ./node_modules/infer-owner/index.js 2:11-24
Module not found: Error: Can't resolve 'fs' in 'C:\Users\jicc\Documents\QuickBase\node_modules\infer-owner'
 @ ./node_modules/cacache/lib/util/fix-owner.js 8:19-41
 @ ./node_modules/cacache/lib/entry-index.js 13:17-44
 @ ./node_modules/cacache/index.js 10:14-45
 @ ./node_modules/make-fetch-happen/lib/cache/entry.js 6:16-34
 @ ./node_modules/make-fetch-happen/lib/cache/index.js 2:19-40
 @ ./node_modules/make-fetch-happen/lib/fetch.js 7:14-41
 @ ./node_modules/make-fetch-happen/lib/index.js 4:14-35
 @ ./node_modules/node-gyp/lib/install.js 12:14-42
 @ ./node_modules/node-gyp/lib/ sync ^\.\/.*$ ./install.js ./install
 @ ./node_modules/node-gyp/lib/node-gyp.js 41:13-36 191:36-53
 @ ./node_modules/@mapbox/node-pre-gyp/lib/util/compile.js 31:26-53
 @ ./node_modules/@mapbox/node-pre-gyp/lib/ sync ^\.\/.*$ ./util/compile.js ./util/compile
 @ ./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js 86:13-36 291:36-53
 @ ./node_modules/bcrypt/bcrypt.js 3:17-48
 @ ./src/taskpane/taskpane.js 11:13-30

ERROR in ./node_modules/ip/lib/ip.js 3:11-24
Module not found: Error: Can't resolve 'os' in 'C:\Users\jicc\Documents\QuickBase\node_modules\ip\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
        - install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "os": false }
 @ ./node_modules/socks/build/client/socksclient.js 15:11-24
 @ ./node_modules/socks/build/index.js 17:13-44
 @ ./node_modules/socks-proxy-agent/dist/index.js 16:16-32
 @ ./node_modules/make-fetch-happen/lib/agent.js 161:24-52
 @ ./node_modules/make-fetch-happen/lib/remote.js 7:17-38
 @ ./node_modules/make-fetch-happen/lib/fetch.js 8:15-37
 @ ./node_modules/make-fetch-happen/lib/index.js 4:14-35
 @ ./node_modules/node-gyp/lib/install.js 12:14-42
 @ ./node_modules/node-gyp/lib/ sync ^\.\/.*$ ./install.js ./install
 @ ./node_modules/node-gyp/lib/node-gyp.js 41:13-36 191:36-53
 @ ./node_modules/@mapbox/node-pre-gyp/lib/util/compile.js 31:26-53
 @ ./node_modules/@mapbox/node-pre-gyp/lib/ sync ^\.\/.*$ ./util/compile.js ./util/compile
 @ ./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js 86:13-36 291:36-53
 @ ./node_modules/bcrypt/bcrypt.js 3:17-48
 @ ./src/taskpane/taskpane.js 11:13-30

ERROR in ./node_modules/isexe/index.js 1:9-22
Module not found: Error: Can't resolve 'fs' in 'C:\Users\jicc\Documents\QuickBase\node_modules\isexe'
 @ ./node_modules/which/which.js 7:14-30
 @ ./node_modules/node-gyp/lib/build.js 7:14-30
 @ ./node_modules/node-gyp/lib/ sync ^\.\/.*$ ./build.js ./build
 @ ./node_modules/node-gyp/lib/node-gyp.js 41:13-36 191:36-53
 @ ./node_modules/@mapbox/node-pre-gyp/lib/util/compile.js 31:26-53
 @ ./node_modules/@mapbox/node-pre-gyp/lib/ sync ^\.\/.*$ ./util/compile.js ./util/compile
 @ ./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js 86:13-36 291:36-53
 @ ./node_modules/bcrypt/bcrypt.js 3:17-48
 @ ./src/taskpane/taskpane.js 11:13-30

ERROR in ./node_modules/isexe/mode.js 4:9-22
Module not found: Error: Can't resolve 'fs' in 'C:\Users\jicc\Documents\QuickBase\node_modules\isexe'
 @ ./node_modules/isexe/index.js 6:9-29
 @ ./node_modules/which/which.js 7:14-30
 @ ./node_modules/node-gyp/lib/build.js 7:14-30
 @ ./node_modules/node-gyp/lib/ sync ^\.\/.*$ ./build.js ./build
 @ ./node_modules/node-gyp/lib/node-gyp.js 41:13-36 191:36-53
 @ ./node_modules/@mapbox/node-pre-gyp/lib/util/compile.js 31:26-53
 @ ./node_modules/@mapbox/node-pre-gyp/lib/ sync ^\.\/.*$ ./util/compile.js ./util/compile
 @ ./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js 86:13-36 291:36-53
 @ ./node_modules/bcrypt/bcrypt.js 3:17-48
 @ ./src/taskpane/taskpane.js 11:13-30

ERROR in ./node_modules/isexe/windows.js 4:9-22
Module not found: Error: Can't resolve 'fs' in 'C:\Users\jicc\Documents\QuickBase\node_modules\isexe'
 @ ./node_modules/isexe/index.js 4:9-32
 @ ./node_modules/which/which.js 7:14-30
 @ ./node_modules/node-gyp/lib/build.js 7:14-30
 @ ./node_modules/node-gyp/lib/ sync ^\.\/.*$ ./build.js ./build
 @ ./node_modules/node-gyp/lib/node-gyp.js 41:13-36 191:36-53
 @ ./node_modules/@mapbox/node-pre-gyp/lib/util/compile.js 31:26-53
 @ ./node_modules/@mapbox/node-pre-gyp/lib/ sync ^\.\/.*$ ./util/compile.js ./util/compile
 @ ./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js 86:13-36 291:36-53
 @ ./node_modules/bcrypt/bcrypt.js 3:17-48
 @ ./src/taskpane/taskpane.js 11:13-30

ERROR in ./node_modules/make-dir/index.js 2:11-24
Module not found: Error: Can't resolve 'fs' in 'C:\Users\jicc\Documents\QuickBase\node_modules\make-dir'
 @ ./node_modules/@mapbox/node-pre-gyp/lib/install.js 13:16-35
 @ ./node_modules/@mapbox/node-pre-gyp/lib/ sync ^\.\/.*$ ./install.js ./install
 @ ./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js 86:13-36 291:36-53
 @ ./node_modules/bcrypt/bcrypt.js 3:17-48
 @ ./src/taskpane/taskpane.js 11:13-30

ERROR in ./node_modules/make-fetch-happen/lib/agent.js 3:12-26
Module not found: Error: Can't resolve 'url' in 'C:\Users\jicc\Documents\QuickBase\node_modules\make-fetch-happen\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
        - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "url": false }
 @ ./node_modules/make-fetch-happen/lib/remote.js 7:17-38
 @ ./node_modules/make-fetch-happen/lib/fetch.js 8:15-37
 @ ./node_modules/make-fetch-happen/lib/index.js 4:14-35
 @ ./node_modules/node-gyp/lib/install.js 12:14-42
 @ ./node_modules/node-gyp/lib/ sync ^\.\/.*$ ./install.js ./install
 @ ./node_modules/node-gyp/lib/node-gyp.js 41:13-36 191:36-53
 @ ./node_modules/@mapbox/node-pre-gyp/lib/util/compile.js 31:26-53
 @ ./node_modules/@mapbox/node-pre-gyp/lib/ sync ^\.\/.*$ ./util/compile.js ./util/compile
 @ ./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js 86:13-36 291:36-53
 @ ./node_modules/bcrypt/bcrypt.js 3:17-48
 @ ./src/taskpane/taskpane.js 11:13-30

ERROR in ./node_modules/make-fetch-happen/lib/agent.js 50:16-44
Module not found: Error: Can't resolve 'https' in 'C:\Users\jicc\Documents\QuickBase\node_modules\make-fetch-happen\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "https": require.resolve("https-browserify") }'
        - install 'https-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "https": false }
 @ ./node_modules/make-fetch-happen/lib/remote.js 7:17-38
 @ ./node_modules/make-fetch-happen/lib/fetch.js 8:15-37
 @ ./node_modules/make-fetch-happen/lib/index.js 4:14-35
 @ ./node_modules/node-gyp/lib/install.js 12:14-42
 @ ./node_modules/node-gyp/lib/ sync ^\.\/.*$ ./install.js ./install
 @ ./node_modules/node-gyp/lib/node-gyp.js 41:13-36 191:36-53
 @ ./node_modules/@mapbox/node-pre-gyp/lib/util/compile.js 31:26-53
 @ ./node_modules/@mapbox/node-pre-gyp/lib/ sync ^\.\/.*$ ./util/compile.js ./util/compile
 @ ./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js 86:13-36 291:36-53
 @ ./node_modules/bcrypt/bcrypt.js 3:17-48
 @ ./src/taskpane/taskpane.js 11:13-30

...

ERROR in ./node_modules/tar/lib/write-entry.js 5:11-24
Module not found: Error: Can't resolve 'fs' in 'C:\Users\jicc\Documents\QuickBase\node_modules\tar\lib'
 @ ./node_modules/tar/index.js 15:0-52
 @ ./node_modules/@mapbox/node-pre-gyp/lib/install.js 16:12-26
 @ ./node_modules/@mapbox/node-pre-gyp/lib/ sync ^\.\/.*$ ./install.js ./install
 @ ./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js 86:13-36 291:36-53
 @ ./node_modules/bcrypt/bcrypt.js 3:17-48
 @ ./src/taskpane/taskpane.js 11:13-30

ERROR in ./node_modules/tar/node_modules/minipass/index.js 10:15-32
Module not found: Error: Can't resolve 'stream' in 'C:\Users\jicc\Documents\QuickBase\node_modules\tar\node_modules\minipass'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }'
        - install 'stream-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "stream": false }
 @ ./node_modules/tar/lib/pack.js 25:17-36
 @ ./node_modules/tar/index.js 11:0-39
 @ ./node_modules/@mapbox/node-pre-gyp/lib/install.js 16:12-26
 @ ./node_modules/@mapbox/node-pre-gyp/lib/ sync ^\.\/.*$ ./install.js ./install
 @ ./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js 86:13-36 291:36-53
 @ ./node_modules/bcrypt/bcrypt.js 3:17-48
 @ ./src/taskpane/taskpane.js 11:13-30

115 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.76.3 compiled with 117 errors and 4 warnings in 16140 ms

如何解决错误或我应该在项目中的什么地方需要模块?

node.js outlook outlook-addin office-addins outlook-web-addins
© www.soinside.com 2019 - 2024. All rights reserved.