sách gpt4 ăn đã đi

góc cạnh - Không tìm thấy gói 'bản đánh máy' cục bộ. Gói "@ngtools/webpack" Angular 2

In lại 作者:太空狗 更新时间:2023-10-29 17:31:23 27 4
mua khóa gpt4 giày nike

我在这里搜索过,Angular 2, @ngtools/webpack, AOT ,但对我不起作用。我运行了 cài đặt npm 命令。我正在做的是创建一个新的 Angular 2 项目。当我运行 ng serve --open 然后我得到了以下错误。

could not find local "typescript" package.The "@ngtools/webpack" package requires a local "typescript@^2.0.2" package to be installed.Error: Cannot find module 'typescript'

我们将不胜感激。

下面是堆栈跟踪:

`C:\Users\jang\Desktop\kendoGrid>ng serve --open
Could not find local "typescript" package.The "@ngtools/webpack" package requires a local "typescript@^2.0.2" package to be installed.Error: Cannot find module 'typescript'
Error: Could not find local "typescript" package.The "@ngtools/webpack" package requires a local "typescript@^2.0.2" package to be installed.Error: Cannot find module 'typescript'
at Object. (C:\Users\jang\Desktop\kendoGrid\node_modules\@ngtools\webpack\src\index.js:18:11)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\jang\Desktop\kendoGrid\node_modules\@angular\cli\models\webpack-config.js:3:19)
at Module._compile (module.js:570:32)

C:\Users\jang\Desktop\kendoGrid>ng version`

câu trả lời hay nhất

为了在评论部分没有答案,这里的错误是不言自明的:

The "@ngtools/webpack" package requires a local "typescript@^2.0.2" package to be installed

所以 webpack 需要 typescript,你只需要安装它。

npm install typescript@latest --save-dev

关于angular - 找不到本地 "typescript"包。 "@ngtools/webpack"包 Angular 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47770769/

27 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress