小编joh*_*ybo的帖子

Chunk.entrypoints:使用Chunks.groupsIterable并通过instanceof Entrypoint过滤

尝试启动我的应用时,我看到以下错误...

> css-modules@1.0.0 start /Users/johnnynolan/Repos/css-modules
Run Code Online (Sandbox Code Playgroud)

webpack && open index.html

(node:5706) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
/Users/johnnynolan/Repos/css-modules/node_modules/webpack/lib/Chunk.js:802
        throw new Error(
        ^

Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
    at Chunk.get (/Users/johnnynolan/Repos/css-modules/node_modules/webpack/lib/Chunk.js:802:9)
    at /Users/johnnynolan/Repos/css-modules/node_modules/extract-text-webpack-plugin/dist/index.js:176:48
    at Array.forEach (<anonymous>)
    at /Users/johnnynolan/Repos/css-modules/node_modules/extract-text-webpack-plugin/dist/index.js:171:18
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/johnnynolan/Repos/css-modules/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:7:1)
    at AsyncSeriesHook.lazyCompileHook [as _callAsync] (/Users/johnnynolan/Repos/css-modules/node_modules/tapable/lib/Hook.js:35:21)
    at Compilation.seal (/Users/johnnynolan/Repos/css-modules/node_modules/webpack/lib/Compilation.js:1203:27)
    at hooks.make.callAsync.err (/Users/johnnynolan/Repos/css-modules/node_modules/webpack/lib/Compiler.js:547:17)
    at _err0 (eval at create (/Users/johnnynolan/Repos/css-modules/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:11:1)
    at _addModuleChain (/Users/johnnynolan/Repos/css-modules/node_modules/webpack/lib/Compilation.js:1054:12)
    at processModuleDependencies.err (/Users/johnnynolan/Repos/css-modules/node_modules/webpack/lib/Compilation.js:980:9)
    at _combinedTickCallback …
Run Code Online (Sandbox Code Playgroud)

javascript npm webpack

69
推荐指数
4
解决办法
4万
查看次数

[Vue警告]:避免将非原始值用作键,而应使用字符串/数字值

我正在构建一个HackerNews的克隆,并收到以下错误:

vue.esm.js?efeb:591 [Vue warn]: Avoid using non-primitive value as key, use string/number value instead.

found in

---> <Single> at src/components/Single.vue
       <App> at src/App.vue
         <Root>
Run Code Online (Sandbox Code Playgroud)

该错误似乎来自Single.vue,但我无法正常工作?模板如下:

<template>
    <div class="container">
        <h2>{{ story.title }}</h2>
        <p>Score: {{ story.score }}</p>
        <p>{{ story.url }}</p>
        <div v-for="comment in comments" :key="comment">
          <div class="comment-wrap">
                <div class="comment-block">
                    <p class="comment-text">{{ comment.text }}</p>
                    <div class="bottom-comment">
                        <div class="comment-author">{{ comment.by }}</div>
                        <div class="comment-date">{{ comment.time }}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
Run Code Online (Sandbox Code Playgroud)

如果有人可以帮助您,那就太好了!

javascript vue.js

9
推荐指数
5
解决办法
1万
查看次数

在ReactJS环境中设置复选框的样式

我想风格的复选框ReactJS的IE11环境,但似乎并没有为具有很大的成功。任何人都可以请教吗?代码如下:

CSS:

 .squared  {
      input[type=checkbox] {
        border-radius: 4px;
        background: #ff0000;
        width:100px;
    }
Run Code Online (Sandbox Code Playgroud)

HTML:

<Col numCol={2} className="col-w-select squared">
  <input style={{float: 'left', borderColor: 'red', border: '3px'}} type="checkbox" checked={isChecked} /> <span className={(String(currentlyClicked) !== String(item[idField])) ? 'l-collapse-icon' : 'l-expand-icon'}>&nbsp;</span>
</Col>
Run Code Online (Sandbox Code Playgroud)

请注意,在输入标签本身中应用样式属性似乎没有任何影响!

谢谢

html javascript css checkbox reactjs

3
推荐指数
2
解决办法
1万
查看次数

错误:运行 `yarn run install-pods` 时生成 pod ENOENT

我正在尝试在我的计算机上设置本机反应,但在运行时yarn run install-pods出现以下错误。

$ ./cli.js installPods
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn pod ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn pod',
  path: 'pod',
  spawnargs: [ 'install', '--project-directory=./hosts/native/ios' ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
 musketeer % yarn run …
Run Code Online (Sandbox Code Playgroud)

react-native yarnpkg

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

如何对三个不同的变量使用相同的函数?

如何对三个不同的变量使用相同的函数?

var game = {score:0},

scoreDisplay = document.getElementById("score1");

function add20() {
  TweenLite.to(game, 1, {score:"+=20", roundProps:"score", onUpdate:updateHandler, ease:Linear.easeNone});
}

function updateHandler() {
  scoreDisplay.innerHTML = game.score;
}

add20();  
Run Code Online (Sandbox Code Playgroud)

我试着将它分解到三个独立的功能function add20(),function add40()function add60()但我知道这是不是继DRY方法.任何帮助,将不胜感激!

javascript

0
推荐指数
1
解决办法
76
查看次数

标签 统计

javascript ×4

checkbox ×1

css ×1

html ×1

npm ×1

react-native ×1

reactjs ×1

vue.js ×1

webpack ×1

yarnpkg ×1