小编der*_*nov的帖子

尝试将"zone.js"编译为外部模块,但它看起来像一个全局模块

我有"AngularClass"angular2-webpack-starter项目我安装了所有npm依赖项现在我正在尝试安装typings

typings.json

{
  "dependencies": {
    "zone.js": "github:gdi2290/typed-zone.js#66ea8a3451542bb7798369306840e46be1d6ec89"
  },
  "devDependencies": {},
  "ambientDependencies": {
    "angular-protractor": "github:DefinitelyTyped/DefinitelyTyped/angular-protractor/angular-protractor.d.ts#64b25f63f0ec821040a5d3e049a976865062ed9d",
    "core-js": "registry:dt/core-js#0.0.0+20160317120654",
    "hammerjs": "github:DefinitelyTyped/DefinitelyTyped/hammerjs/hammerjs.d.ts#74a4dfc1bc2dfadec47b8aae953b28546cb9c6b7",
    "jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#4b36b94d5910aa8a4d20bdcd5bd1f9ae6ad18d3c",
    "node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#8cf8164641be73e8f1e652c2a5b967c7210b6729",
    "selenium-webdriver": "github:DefinitelyTyped/DefinitelyTyped/selenium-webdriver/selenium-webdriver.d.ts#a83677ed13add14c2ab06c7325d182d0ba2784ea",
    "webpack": "github:DefinitelyTyped/DefinitelyTyped/webpack/webpack.d.ts#95c02169ba8fa58ac1092422efbd2e3174a206f4"
  }
}
Run Code Online (Sandbox Code Playgroud)

当我输入

sudo typings install
Run Code Online (Sandbox Code Playgroud)

我有

derzunov:angular2-webpack-starter derzunov$ sudo typings install
typings ERR! message Attempted to compile "zone.js" as an external module, but it looks like a global module.

typings ERR! cwd /Users/derzunov/projects/Angular2/angular2-webpack-starter
typings ERR! system Darwin 15.4.0
typings ERR! command "/usr/local/bin/node" "/usr/local/bin/typings" "install"
typings ERR! node -v v4.4.4
typings ERR! typings -v …
Run Code Online (Sandbox Code Playgroud)

javascript node.js typescript angular

12
推荐指数
1
解决办法
5110
查看次数

"无法在Backbone网站上使用Disqus查看属性'appendChild'of null"

我在Backbone上有一个网站.当我尝试执行Disqus代码时,我得到了

未捕获的TypeError:无法读取null的属性'appendChild'

我该如何解决?为什么会这样?

var disqus_shortname = 'mysite';

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
  var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
  dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
Run Code Online (Sandbox Code Playgroud)

安慰:

undefined
embed.js:1 Unsafe attempt to redefine existing module: BASE
embed.js:1 Unsafe attempt to redefine existing module: apps
embed.js:1 Unsafe attempt to redefine existing module: get
...

embed.js:1 Unsafe attempt to redefine existing module: configAdapter
embed.js:1 Unsafe attempt to …
Run Code Online (Sandbox Code Playgroud)

javascript disqus backbone.js

5
推荐指数
2
解决办法
8712
查看次数

标签 统计

javascript ×2

angular ×1

backbone.js ×1

disqus ×1

node.js ×1

typescript ×1