问题描述
我已经安装了@ types / heremaps 3.0.15版本https://www.npmjs.com/package/@types/heremaps。
我正打算使用H namspace。我正在运行节点js服务器。 在我的react组件中,我使用:
public static createPlatform(mapCredentials: MapCredentials): H.service.Platform {
return new H.service.Platform({
'app_id': mapCredentials.applicationId,'app_code': mapCredentials.applicationCode,'useHTTPS': true
});
}
}
打开
tsc -p tsconfig.server.json
ReferenceError:未定义H 在Function.createPlatform(/Users/skaulka/workspace/GRITTestWS/src/GRITArtWeb/.next/server/static/0377bb797cbd849995c225227bf073d7613decbe/pages/map/MapPlatformService.js:323:5)
这是我的配置设置:
{
"compilerOptions": {
"lib": [
"dom","dom.iterable","esnext","es6"
],"module": "commonjs","outDir": "./dist","strict": false,"esModuleInterop": true,"forceConsistentCasingInFileNames": true,"target": "es5","skipLibCheck": true,"noEmit": false,"isolatedModules": true,"jsx": "preserve","allowJs": true,"moduleResolution": "node","resolveJsonModule": true,"noImplicitAny": false,"typeRoots": [
"/Users/skaulka/workspace/GRITTestWS/src/GRITArtWeb/node_modules/@types","/Users/skaulka/workspace/GRITTestWS/src/GRITArtWeb/typings","/Users/skaulka/workspace/GRITTestWS/src/GRITArtWeb/typings/@art","/Users/skaulka/workspace/GRITTestWS/src/GRITArtWeb/reflect-Metadata"
],"types": [
"@types/heremaps"
]
},"files": [
"./next-env.d.ts","./__tests__/setup-enzyme.ts","./src/config/app-config.ts","./src/model/map/GeoPoint.ts","./src/model/map/MapCredentials.ts","./src/model/map/WebConfig.ts","./src/pages/map/MapControl.ts","./src/pages/map/MapPlatformService.ts","./src/pages/map/MapService.ts","./src/pages/map/map-container.ts","./src/pages/map/map-factory.ts","./src/pages/map/modules.d.ts","./src/server/index.ts","./src/typings/declarations.d.ts"
],"include": [
"**/*.ts"
],"exclude": [
"build"
]
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)