NativeScript / nativescript-dev-webpack

A package to help with webpacking NativeScript apps.
Apache License 2.0
97 stars 49 forks source link

Bug after create new project #1158

Open PetroSuch opened 2 years ago

PetroSuch commented 2 years ago

I created a new project by ns create command After ns run i got an error node_modules\@ngtools\webpack\src\ivy\plugin.js:35

    const mainFields = (_c = (_b = (_a = webpackOptions.resolve) === null || _a === void 0 ? void 0 : _a.mainFields) === null || _b === void 0 ? void 0 : _b.flat()) !== null && _c !== void 0 ? _c : [];
                                                                                                                                                             ^
TypeError: _b.flat is not a function
    at initializeNgccProcessor (D:\project-test\node_modules\@ngtools\webpack\src\ivy\plugin.js:35:158)
    at compiler.hooks.thisCompilation.tap (D:\project-test\node_modules\@ngtools\webpack\src\ivy\plugin.js:109:57)
    at Hook.eval [as call] (eval at create (D:\project-test\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:9:1)
    at Hook.CALL_DELEGATE [as _call] (D:\project-test\node_modules\webpack\node_modules\tapable\lib\Hook.js:14:14)
    at Compiler.newCompilation (D:\project-test\node_modules\webpack\lib\Compiler.js:1043:30)
    at hooks.beforeCompile.callAsync.err (D:\project-test\node_modules\webpack\lib\Compiler.js:1088:29)
    at Hook.eval [as callAsync] (eval at create (D:\project-test\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (D:\project-test\node_modules\webpack\node_modules\tapable\lib\Hook.js:18:14)
    at Compiler.compile (D:\project-test\node_modules\webpack\lib\Compiler.js:1083:28)
    at compiler.hooks.watchRun.callAsync.err (D:\project-test\node_modules\webpack\lib\Watching.js:200:19)
    at eval (eval at create (D:\project-test\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:11:1)
    at D:\project-test\node_modules\@nativescript\webpack\dist\plugins\WatchStatePlugin.js:22:13
    at Hook.eval [as callAsync] (eval at create (D:\project-test\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:7:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (D:\project-test\node_modules\webpack\node_modules\tapable\lib\Hook.js:18:14)
    at run (D:\project-test\node_modules\webpack\lib\Watching.js:154:33)
    at compiler.readRecords.err (D:\project-test\node_modules\webpack\lib\Watching.js:149:6)
Executing webpack failed with exit code 1.