在node_modules下的文件中所做的更改

时间:2018-05-08 18:21:52

标签: angular git npm datepicker ngx-bootstrap

我更改了node_modules文件夹中的一些文件。但是当我使用int[apply(int,1, function(x) all(x %in% proteins)),] 构建应用程序时,当我将其部署到服务器时,我看到我在node_modules中所做的更改不存在。如何克服这个?

我尝试了以下3种方式

  1. 我已将ng build -op="app" --base -href="dist" --aot存储库分为GIT 然后我在我的项目中使用了ngx-bootstrap。我已将npm install https://github.com/krishnag9/ngx-bootstrap/tarball/master更改为import { BsDaterangepickerDirective } from 'ngx-bootstrap/datepicker' 我现在面临以下例外

    import { BsDaterangepickerDirective } from 'ngx-bootstrap-base/src/datepicker'

  2. 此外,我已尝试ERROR in ./node_modules/ngx-bootstrap-base/src/index.ts Module build failed: Error: NPMLINK_TEST/node_modules/ngx-bootstrap-base/src/index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property. The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format at AngularCompilerPlugin.getCompiledFile (NPMLINK_TEST/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:656:23) at plugin.done.then (NPMLINK_TEST/node_modules/@ngtools/webpack/src/loader.js:467:39) at <anonymous> at process._tickCallback (internal/process/next_tick.js:182:7) @ ./src/app/app.module.ts 49:12-45 54:12-45 @ ./src/main.ts @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts ERROR in ./node_modules/ngx-bootstrap-base/src/modal/index.ts Module build failed: Error: NPMLINK_TEST/node_modules/ngx-bootstrap-base/src/modal/index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property. The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format at AngularCompilerPlugin.getCompiledFile (NPMLINK_TEST/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:656:23) at plugin.done.then (NPMLINK_TEST/node_modules/@ngtools/webpack/src/loader.js:467:39) at <anonymous> at process._tickCallback (internal/process/next_tick.js:182:7) @ ./src/app/canceltickets/canceltickets.component.ts 21:14-53 22:14-53 @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts以及以下错误

    npm install https://github.com/krishnag9/ngx-bootstrap --save-dev

  3. 使用ERROR in node_modules/ngx-bootstrap-base/src/mini-ngrx/state.class.ts(5,39): error TS2305: Module '"NPMLINK_TEST/node_modules/rxjs/Rx"' has no exported member 'queueScheduler'. node_modules/ngx-bootstrap-base/src/tooltip/tooltip.directive.ts(20,10): error TS2305: Module '"NPMLINK_TEST/node_modules/rxjs/Rx"' has no exported member 'timer'. node_modules/ngx-bootstrap-base/src/typeahead/typeahead.directive.ts(18,10): error TS2305: Module '"NPMLINK_TEST/node_modules/rxjs/Rx"' has no exported member 'from'. 我已经在我的node_modules之外克隆了git存储库 下一个npm link 我执行了命令cd ngx-bootstrap 重定向到npm link文件夹 在这里我做了node_modules 我的控制台没有错误,但是我已经更改的代码没有反映在那里,并且在浏览器控制台中也面临异常

    npm link ngx-bootstrap

2 个答案:

答案 0 :(得分:1)

如果你只需要更改图标,就可以这样做。 每当触发datepicker时,您只需添加以下行。

document.querySelector(".previous span").innerHTML = "<="

document.querySelector(".next span").innerHTML = "=>"

您可以使用想要使用的任何图标更改"=>"

检查一下。 转到https://valor-software.com/ngx-bootstrap/#/datepicker

然后打开任何日期选择器并打开控制台并将其粘贴到控制台document.querySelector(".next span").innerHTML = "=>"

看到下一个图标更改为=>

答案 1 :(得分:-1)

这取决于您构建应用程序的方式,可能是您的webpack配置。 向我们展示您的webpack配置,您应该配置您的加载程序以包含该模块。