小编Jos*_*inn的帖子

Webpack 忽略 node-pre-gyp 文件

我有一个大型的 Angular SSR 应用程序,它argon2在后端用于散列密码。我目前正在尝试使用 Webpack 捆绑应用程序,但遇到了阻止 Webpack 构建成功的argon2依赖问题。@mapbox/node-pre-gyp

我收到的错误是:

./node_modules/.pnpm/@mapbox+node-pre-gyp@1.0.6/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html:1:0 - Error: Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> <!doctype html>
| <html>
| <head>
Run Code Online (Sandbox Code Playgroud)

我尝试为 Webpack 的 IgnorePlugin 添加规则,如下所示:

new IgnorePlugin({
  resourceRegExp: /\.html$/,
  contextRegExp: /@mapbox\/node-pre-gyp/
})
Run Code Online (Sandbox Code Playgroud)

但该文件并没有被 Webpack 忽略。

我还尝试添加html-loaderHTML 文件的 Webpack 配置,但它似乎也没有获取 HTML 文件。

我尝试忽略来自的 HTML 文件时是否做错了什么node-pre-gyp

webpack angular node-pre-gyp

8
推荐指数
0
解决办法
934
查看次数

无法在 Docker 容器中启动 SQL Server 2022

由于找不到文件或目录的问题,我目前无法在其 docker 容器中启动 SQL Server 2022。但错误消息的输出没有给出我所缺少的任何线索。该容器能够在今天之前启动(我对主机进行了更新并重新启动,没有任何更改应该不允许执行):

Attaching to db-1
db-1  | SQL Server 2022 will run as non-root by default.
db-1  | This container is running as user mssql.
db-1  | Your master database file is owned by mssql.
db-1  | To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.
db-1  | This program has encountered a fatal error and cannot continue running at Mon Jan 15 16:34:36 2024
db-1  | The following diagnostic information is available:
db-1  | 
db-1  |          Reason: 0x00000001
db-1 …
Run Code Online (Sandbox Code Playgroud)

sql-server docker docker-compose

1
推荐指数
1
解决办法
444
查看次数

无法使用 Clang-14 编译 C++ 程序

scons我目前正在尝试编译一个我一直在使用 Clang 编写的小程序,并且在使用构建系统进行编译时出现以下错误:

/usr/bin/clang++ -o src/PluGen/main.o -c -std=c++17 -fPIC -I. -O2 -fno-strict-aliasing -fpermissive -fopenmp --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fpermissive -fPIC -I. -O2 -flto -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -DHAVE_PYTHON -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLARGE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_PERL -DREENTRANT -DHAVE_R -I/usr/include -I/usr/local/include -Isrc -I/usr/include/python3.10 -I/usr/lib/perl5/5.36/core_perl/CORE -I/usr/include/R -I/usr/lib/R/library/Rcpp/include -I/usr/lib/R/library/RInside/include -I/usr/lib/R/site-library/RInside/include -I/usr/lib/R/site-library/Rcpp/include -I/usr/local/lib/R/library/Rcpp/include -I/usr/local/lib/R/library/RInside/include -I/usr/local/lib/R/site-library/RInside/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/local/lib/R/site-library/RInside/lib src/PluGen/main.cxx
...
/usr/bin/clang++ -o PluGen/plugen -rdynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.36/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now src/PluGen/main.o src/PluGen/PluginGenerator.o -L/lib -L/usr/lib -L/usr/local/lib -L/usr/lib/perl5/5.36/core_perl/CORE -L/usr/lib/R/lib -L/usr/lib/R/library/RInside/lib -L/usr/lib/R/site-library/RInside/lib -L/usr/local/lib/R/library/RInside/lib -L/usr/local/lib/R/site-library/RInside/lib -Llib -lc -lc++ -lstdc++fs
src/PluGen/main.o: file not …
Run Code Online (Sandbox Code Playgroud)

c++ linux clang clang++ llvm-ir

0
推荐指数
1
解决办法
1419
查看次数