- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我在这里搜索过,Angular 2, @ngtools/webpack, AOT ,但对我不起作用。我运行了 npm install
命令。我正在做的是创建一个新的 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.<anonymous> (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.<anonymous> (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`
最佳答案
为了在评论部分没有答案,这里的错误是不言自明的:
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/
我正在使用@ngtools/webpack 学习 angular 6,我在处理 css 时遇到了问题。 我在 webpack.config.js 中有以下模块规则 module: { rule
我一直在尝试使用 ngTools 在我的 Angular 应用程序中设置 AOT(使用 Webpack 进行模块加载),并且有一段时间绝对是噩梦。我已经浏览了文档中的各种资源 here和 here以及
更新:升级到 1.7.0.beta.1 解决了这个问题,但现在我收到另一个错误: ERROR in ./src/main.ts Module build failed: Error: Angular
我一直在尝试让 AOT 与我的 Webpack 应用程序一起工作。(@ngtools/webpack) 谁能帮帮我? 它似乎可以工作,但是,compiler.js 仍包含在 bundle 中。此外,它
我的项目是在 Linux 上构建的,我不知道为什么。发行版是 Red Hat Enterprise Linux Server 7.0 版。 我的环境是: "node" : "6.9.1" "@angu
我在 angular 7 和 ionic 4 上创建了一个应用程序。 我试图编辑 app.routing.ts 文件,设置路径和组件。从那时起,我在下面收到此错误: ERROR in ./src/ap
我正在尝试使用 Angular 5 和 WebPack 构建一个通用应用程序,而无需使用 cli。 我遇到的问题是我似乎无法让 Express 应用程序正常工作,并且每次访问服务器时都会遇到此错误 E
我在这里搜索过,Angular 2, @ngtools/webpack, AOT ,但对我不起作用。我运行了 npm install 命令。我正在做的是创建一个新的 Angular 2 项目。当我运行
我尝试使用 ngtools/webpack 进行 AOT 编译。在我尝试创建延迟加载的路由之前,它工作正常。我收到的错误 - Error: Cannot find module './componen
我正在开发一个与 AOT 编译兼容的 Angular 库。我已经使用 ngc 周围的一些 gulp 任务启动并运行它,但我更喜欢使用 @ngtools/webpack,因为它允许我使用更直接的方法SA
我已将我的 Angular CLI 项目从 8 升级到 9。 这是当前的 Angular CLI 和其他包版本: Angular CLI: 9.1.15 Node: 14.17.0 OS: win32
我是一名优秀的程序员,十分优秀!