./build.sh all 报错
Opened this issue · 9 comments
您好,在执行 ./build.sh all 操作时遇到以下错误,请求帮助,谢谢
#node -v
v16.13.1
#npm -v
8.1.2
`WARNING in ./node_modules/_@angular_core@9.0.7@@angular/core/ivy_ngcc/fesm2015/core.js 42527:19-40
System.import() is deprecated and will be removed soon. Use import() instead.
For more info visit https://webpack.js.org/guides/code-splitting/
@ ./src/main.ts 15:0-47 20:4-18
@ multi ./src/main.ts
WARNING in ./node_modules/_@angular_core@9.0.7@@angular/core/ivy_ngcc/fesm2015/core.js 42554:19-106
System.import() is deprecated and will be removed soon. Use import() instead.
For more info visit https://webpack.js.org/guides/code-splitting/
@ ./src/main.ts 15:0-47 20:4-18
@ multi ./src/main.ts
wilearning@2.0.0 build
ng build --prod --base-href /app/
ERROR in node_modules/@types/node/assert.d.ts:2:68 - error TS1144: '{' or ';' expected.
2 function assert(value: any, message?: string | Error): asserts value;
~~~~~
node_modules/@types/node/assert.d.ts:53:68 - error TS1144: '{' or ';' expected.
53 function ok(value: any, message?: string | Error): asserts value;
~~~~~
node_modules/@types/node/assert.d.ts:62:94 - error TS1144: '{' or ';' expected.
62 function strictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T;
~~~~~~
node_modules/@types/node/assert.d.ts:62:101 - error TS1005: ';' expected.
62 function strictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T;
~~
node_modules/@types/node/assert.d.ts:62:104 - error TS1005: ';' expected.
62 function strictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T;
~
node_modules/@types/node/assert.d.ts:64:98 - error TS1144: '{' or ';' expected.
64 function deepStrictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T;
~~~~~~
node_modules/@types/node/assert.d.ts:64:105 - error TS1005: ';' expected.
64 function deepStrictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T;
~~
node_modules/@types/node/assert.d.ts:64:108 - error TS1005: ';' expected.
64 function deepStrictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T;
~
node_modules/@types/node/assert.d.ts:72:47 - error TS1144: '{' or ';' expected.
72 function ifError(value: any): asserts value is null | undefined;
~~~~~
node_modules/@types/node/assert.d.ts:72:53 - error TS1005: ';' expected.
72 function ifError(value: any): asserts value is null | undefined;
~~
node_modules/@types/node/assert.d.ts:72:56 - error TS1005: ';' expected.
72 function ifError(value: any): asserts value is null | undefined;
~~~~
node_modules/@types/node/assert.d.ts:99:61 - error TS1005: ';' expected.
99 (value: any, message?: string | Error): asserts value;
`
哪位大佬知道怎么解决 ?
俺也一样!
有人能看一下吗?这个问题困扰好多天了@!
@linewei @wistingcn @alzee 您好,是否麻烦看下什么问题导致的? npm版本更换过也不行报相同的错误,谢谢
看看操作系统及版本 @h77626592
Ubuntu 18.04 LTS
Linux 11111 4.15.0-118-generic #119-Ubuntu SMP Tue Sep 8 12:30:01 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux @wistingcn
问题解决了吗?
Linux rcrwhyg 5.4.0-109-generic #123~18.04.1-Ubuntu SMP Fri Apr 8 09:48:52 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
node version:v17.0.1
npm version:8.10.0
您好,在执行 ./build.sh all 操作时遇到以下错误,请求帮助,谢谢
#node -v v16.13.1 #npm -v 8.1.2
`WARNING in ./node_modules/_@angular_core@9.0.7@@angular/core/ivy_ngcc/fesm2015/core.js 42527:19-40 System.import() is deprecated and will be removed soon. Use import() instead. For more info visit https://webpack.js.org/guides/code-splitting/ @ ./src/main.ts 15:0-47 20:4-18 @ multi ./src/main.ts
WARNING in ./node_modules/_@angular_core@9.0.7@@angular/core/ivy_ngcc/fesm2015/core.js 42554:19-106 System.import() is deprecated and will be removed soon. Use import() instead. For more info visit https://webpack.js.org/guides/code-splitting/ @ ./src/main.ts 15:0-47 20:4-18 @ multi ./src/main.ts
wilearning@2.0.0 build
ng build --prod --base-href /app/ERROR in node_modules/@types/node/assert.d.ts:2:68 - error TS1144: '{' or ';' expected.
2 function assert(value: any, message?: string | Error): asserts value; ~~~~~ node_modules/@types/node/assert.d.ts:53:68 - error TS1144: '{' or ';' expected.
53 function ok(value: any, message?: string | Error): asserts value; ~~~~~ node_modules/@types/node/assert.d.ts:62:94 - error TS1144: '{' or ';' expected.
62 function strictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T; ~~~~~~ node_modules/@types/node/assert.d.ts:62:101 - error TS1005: ';' expected.
62 function strictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T; ~~ node_modules/@types/node/assert.d.ts:62:104 - error TS1005: ';' expected.
62 function strictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T; ~ node_modules/@types/node/assert.d.ts:64:98 - error TS1144: '{' or ';' expected.
64 function deepStrictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T; ~~~~~~ node_modules/@types/node/assert.d.ts:64:105 - error TS1005: ';' expected.
64 function deepStrictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T; ~~ node_modules/@types/node/assert.d.ts:64:108 - error TS1005: ';' expected.
64 function deepStrictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T; ~ node_modules/@types/node/assert.d.ts:72:47 - error TS1144: '{' or ';' expected.
72 function ifError(value: any): asserts value is null | undefined; ~~~~~ node_modules/@types/node/assert.d.ts:72:53 - error TS1005: ';' expected.
72 function ifError(value: any): asserts value is null | undefined; ~~ node_modules/@types/node/assert.d.ts:72:56 - error TS1005: ';' expected.
72 function ifError(value: any): asserts value is null | undefined; ~~~~ node_modules/@types/node/assert.d.ts:99:61 - error TS1005: ';' expected.
99 (value: any, message?: string | Error): asserts value; `
修改app下的package.json文件,锁定@types/node版本
哪位大佬知道怎么解决 ?
请问如何解决的?