我收到一些警告,如下所示,事情无法找到,但他们在正确的地方,我的应用程序运行所以警告一定是错误的.我正在使用webpack版本2.1.0-beta.22和webpack-dev-server 2.1.0-beta.10.我的项目是在GitHub上这里
你知道我怎么解决这个问题吗?谢谢!
[WDS] Warnings while compiling.
client:73 ./src/app/debate/claim/claim.component.ts
38:55 export 'Claim' was not found in '../../core/store/claim/claim.model'
Error: export 'Claim' was not found in '../../core/store/claim/claim.model'
at HarmonyImportSpecifierDependency.getWarnings (/Users/Dan/work/bernierebuttals/gba/node_modules/angular-cli/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:34:14)
at /Users/Dan/work/bernierebuttals/gba/node_modules/angular-cli/node_modules/webpack/lib/Compilation.js:645:21
at Array.forEach (native)
at /Users/Dan/work/bernierebuttals/gba/node_modules/angular-cli/node_modules/webpack/lib/Compilation.js:644:22
at Array.forEach (native)
at Compilation.reportDependencyWarnings (/Users/Dan/work/bernierebuttals/gba/node_modules/angular-cli/node_modules/webpack/lib/Compilation.js:643:9)
at Compilation.<anonymous> (/Users/Dan/work/bernierebuttals/gba/node_modules/angular-cli/node_modules/webpack/lib/Compilation.js:505:8)
at Array.forEach (native)
at Compilation.finish
Run Code Online (Sandbox Code Playgroud)
文件结构如下所示:
app
??? core
? ??? store
? ? ??? claim
? ? ? ??? README.md
? ? ? ??? claim.actions.ts
? ? ? ??? claim.effects.ts
? ? ? …Run Code Online (Sandbox Code Playgroud) 我正在写这个比较,以帮助人们理解所有这些废话,目前,它看起来像生成器角度的好处和价值是你使用generator-angular-fullstack获得的一部分.我自己填写这些东西,我不是专家,所以很可能充满了可疑的事实.
但它已经被传递了很多,没有人哭过犯规,所以也许这是正确的.如果是这样,那将导致合乎逻辑的结论:人们应该总是使用generator-angular-fullstack并删除后端部分(如果不需要它们).但事实并非如此,因为许多人仍在使用发电机角度.我看到发电机角度 - fullstack是从发电机角度分叉的,但那么呢?
我想我一定错过了什么.发电机角度给人们发电机角度全堆栈没有什么意义?
这是我的第一个 React Native 项目。回购在这里。
当我启动expo 时,出现错误:
Cannot find module 'babel-preset-react'
Run Code Online (Sandbox Code Playgroud)
在别人,它有这些依赖关系:
"expo": "^32.0.0",
"react": "16.8.4",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.1.tar.gz",
"@babel/core": "7.3.4",
"babel-core": "^7.0.0-bridge.0",
"@babel/preset-react": "^7.0.0",
Run Code Online (Sandbox Code Playgroud)
我在我的应用程序的 /node_modules 中找到了这四个库,每个库都包含对“babel-preset-react”的开发依赖:
提升非反应静态、道具类型、反应输入自动大小和反应代理。
这些都没有依赖于“@babel/preset-react”的较新版本。
我想在URL(myapp.com#somevalue)中传递一个值作为哈希值,并在页面加载时让页面滚动到该项目-这正是自互联网开始以来使用哈希片段的行为。我尝试使用scrollIntoView,但在iOS上失败。然后,我尝试仅取消设置/设置window.location.hash,但似乎存在竞争条件。仅当延迟超过600ms时才有效。
我想要一个更可靠的解决方案,不想引入不必要的延迟。当延迟太短时,它似乎滚动到所需的项目,然后滚动到页面顶部。您不会在此演示中看到效果,但是会在我的实际应用中发生https://codesandbox.io/s/pjok544nrx第75行
componentDidMount() {
let self = this;
let updateSearchControl = hash => {
let selectedOption = self.state.searchOptions.filter(
option => option.value === hash
)[0];
if (selectedOption) {
// this doesn't work with Safari on iOS
// document.getElementById(hash).scrollIntoView(true);
// this works if delay is 900 but not 500 ms
setTimeout(() => {
// unset and set the hash to trigger scrolling to target
window.location.hash = null;
window.location.hash = hash;
// scroll back by the height of the Search box …Run Code Online (Sandbox Code Playgroud) 构建我的JHipster Angular项目时出现此错误
[ERROR] Error at /Users/Dan/work/gba/node_modules/ng-jhipster/src/interceptor/interceptable-http.d.ts:4:22: Class 'InterceptableHttp' incorrectly extends base class 'Http'.
[ERROR] Types of property 'request' are incompatible.
[ERROR] Type '(url: string | Request, options?: RequestOptionsArgs) => Observable<Response>' is not assignable to type '(url: string | Request, options?: RequestOptionsArgs) => Observable<Response>'. Two different types with this name exist, but they are unrelated.
[ERROR] Type 'Observable<Response>' is not assignable to type 'Observable<Response>'. Two different types with this name exist, but they are unrelated.
[ERROR] Property 'source' is protected but …Run Code Online (Sandbox Code Playgroud) 我想将 onScroll 处理程序添加到反应选择组件的 menuList 中,但以下内容不起作用。我怀疑我需要onScroll为其中一个子元素设置 ,而不是为包含子元素的元素设置 ,但我不知道该怎么做。
import React from 'react';
import Select, { components, MenuListProps } from 'react-select';
import {
ColourOption,
colourOptions,
FlavourOption,
GroupedOption,
groupedOptions,
} from './docs/data';
const handleScroll = () =>{
console.log('scrolling')
}
const MenuList = (
props: MenuListProps<ColourOption | FlavourOption, false, GroupedOption>
) => {
return (
<components.MenuList {...props}>
<div onScroll={handleScroll}>
{props.children}
</div>
</components.MenuList>
);
};
export default () => (
<Select<ColourOption | FlavourOption, false, GroupedOption>
defaultValue={colourOptions[1]}
menuIsOpen={true}
options={groupedOptions}
components={{ MenuList }}
/>
); …Run Code Online (Sandbox Code Playgroud) 在我的Angular + Webpack + JHipster + yarn项目中,出现以下错误。然后我删除node_modules并运行“ npm install”,它消失了。然后我这样做,然后又回来了。怎么来的?我不想这样做。错误中列出的TranslateService是库提供的,不是我自己的,而是在我未编写的项目的三个生成的组件中使用的。
ERROR Error: No provider for TranslateService!
at injectionError (vendor.dll.js:1659)
at noProviderError (vendor.dll.js:1697)
at ReflectiveInjector_._throwOrNull (vendor.dll.js:3198)
at ReflectiveInjector_._getByKeyDefault (vendor.dll.js:3237)
at ReflectiveInjector_._getByKey (vendor.dll.js:3169)
at ReflectiveInjector_.get (vendor.dll.js:3038)
at GreatBigExampleApplicationAppModuleInjector.get (ng:///GreatBigExampleApplicationAppModule/module.ngfactory.js:515)
at GreatBigExampleApplicationAppModuleInjector.getInternal (ng:///GreatBigExampleApplicationAppModule/module.ngfactory.js:2452)
at GreatBigExampleApplicationAppModuleInjector.NgModuleInjector.get (vendor.dll.js:4005)
at resolveDep (vendor.dll.js:11467)
Run Code Online (Sandbox Code Playgroud) 我不明白为什么ng new将新项目放在当前目录的父目录中而不是将其放在当前目录中.
[12:05:59] angular-cli
// ? pwd
/Users/Dan/work/angular-cli
[12:06:06] angular-cli
// ? ng new ang-cli-1
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
installing ng2
create .clang-format
create .editorconfig
create src/app/ang-cli-1.component.css
create src/app/ang-cli-1.component.html
create src/app/ang-cli-1.component.spec.ts
create src/app/ang-cli-1.component.ts
create src/app/environment.ts
create src/app/index.ts
create src/app/shared/index.ts
create src/favicon.ico
create src/index.html
create src/main.ts
create src/system-config.ts
create src/tsconfig.json
create src/typings.d.ts
create angular-cli-build.js
create angular-cli.json
create config/environment.dev.ts
create config/environment.js
create config/environment.prod.ts
create config/karma-test-shim.js
create config/karma.conf.js …Run Code Online (Sandbox Code Playgroud) 如果我在重复中插入一个字符串变量,<li>它会正确显示,但如果我把它放在一个<template><li>它显示为[object Object].这是为什么?我已经看到了<template>语法的一些演变,但似乎没有一个工作.
angular ×4
reactjs ×3
angular-cli ×2
angularjs ×2
react-select ×2
webpack ×2
yarnpkg ×2
babeljs ×1
jhipster ×1
npm ×1
react-native ×1
rxjs ×1
typescript ×1