【发布时间】:2017-09-17 16:41:25
【问题描述】:
我正在尝试将 ionic 2 应用程序连接到 backand 并收到此运行时错误:
找不到模块“ionic-native”。
我尝试过运行npm install @ionic-native/core --save - 但没有帮助。非常感谢
设置细节在这里:Ionic Framework:3.0.1 Ionic App 脚本: 1.3.0 Angular 核心:4.0.0 Angular 编译器 CLI:4.0.0 节点:6.10.1 操作系统平台:Windows 10 导航器平台:Win32 用户代理:Mozilla/5.0 (Windows NT 10.0;Win64;x64)AppleWebKit/537.36(KHTML,如 Gecko) Chrome/57.0.2987.133 Safari/537.36
错误:在 g 处找不到模块“ionic-native” (localhost:8100/build/polyfills.js:3:7133) 在 Object.module.exports (localhost:8100/build/main.js:114616:7) 在 webpack_require (本地主机:8100/build/main.js:20:30)在对象。 (localhost:8100/build/main.js:86362:73) 在 webpack_require (本地主机:8100/build/main.js:20:30)在对象。 (localhost:8100/build/main.js:140153:70) 在 webpack_require (本地主机:8100/build/main.js:20:30)在 本地主机:8100/build/main.js:66:18
Package.Json如下:
{
"name": "ionic-hello-world",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "4.0.0",
"@angular/compiler": "4.0.0",
"@angular/compiler-cli": "4.0.0",
"@angular/core": "4.0.0",
"@angular/forms": "4.0.0",
"@angular/http": "4.0.0",
"@angular/platform-browser": "4.0.0",
"@angular/platform-browser-dynamic": "4.0.0",
"@ionic-native/core": "3.4.2",
"@ionic-native/splash-screen": "3.4.2",
"@ionic-native/status-bar": "3.4.2",
"@ionic/storage": "2.0.1",
"ionic-angular": "3.0.1",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"socket.io-client": "^1.7.3",
"sw-toolbox": "3.4.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@ionic/app-scripts": "1.3.0",
"@types/node": "7.0.13",
"@types/socket.io-client": "1.4.29",
"typescript": "~2.2.1"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-statusbar",
"cordova-plugin-console",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard",
"cordova-plugin-inappbrowser"
],
"cordovaPlatforms": [],
"description": "myApp: An Ionic project"
}
【问题讨论】:
-
我不确定您需要看到什么,但感谢您的帮助
-
您能出示您的
package.json文件吗?切勿将您的问题放在评论部分。请将其删除并与您的原始帖子一起放置。 -
嗨,它不会让我将所有内容粘贴到原始评论中,因为它显然有链接。使用 stackoverflow 很新。如何获取 package.json 文件?我意识到这可能是一个菜鸟问题
-
这是样本
package.json文件?那么你的是什么? github.com/driftyco/ionic-conference-app/blob/master/… -
感谢 Sampath,已将其添加到问题中
标签: node.js ionic-framework ionic2 backand