我使用 ionic-native 模块得到构建错误,因为它总是给我以下错误
Error: ./src/pages/admin-home/admin-home.ts Module not found: Error: Can't resolve 'ionic-native' in
'E:\Work\myBabyFeed\myBabyFeed\src\pages\admin-home' resolve 'ionic-native' in
'E:\Work\myBabyFeed\myBabyFeed\src\pages\admin-home' Parsed request is a module using description file:
E:\Work\myBabyFeed\myBabyFeed\package.json (relative path: ./src/pages/admin-home) Field 'browser' doesn't
contain a valid alias configuration after using description file: E:\Work\myBabyFeed\myBabyFeed\package.json
(relative path: ./src/pages/admin-home) resolve as module looking for modules in
E:\Work\myBabyFeed\myBabyFeed\node_modules using description file:
E:\Work\myBabyFeed\myBabyFeed\package.json (relative path: ./node_modules) Field 'browser' doesn't contain a
valid alias configuration after using description file: E:\Work\myBabyFeed\myBabyFeed\package.json (relative
path: ./node_modules) using description file:
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\package.json (relative path: .) no extension Field
'browser' doesn't contain a valid alias configuration
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native is not a file .ts Field 'browser' doesn't contain a
valid alias configuration E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native.ts doesn't exist .js Field
'browser' doesn't contain a valid alias configuration
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native.js doesn't exist .json Field 'browser' doesn't
contain a valid alias configuration E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native.json doesn't
exist as directory existing directory using path:
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\index using description file:
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\package.json (relative path: ./index) no extension
Field 'browser' doesn't contain a valid alias configuration
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\index doesn't exist .ts Field 'browser' doesn't
contain a valid alias configuration E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\index.ts doesn't
exist .js Field 'browser' doesn't contain a valid alias configuration
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\index.js doesn't exist .json Field 'browser' doesn't
contain a valid alias configuration E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\index.json
doesn't exist [E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native]
[E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native.ts]
[E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native.js]
[E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native.json]
[E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\index]
[E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\index.ts]
[E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\index.js]
[E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\index.json] @ ./src/pages/admin-home/admin-home.ts
13:0-46 @ ./src/app/app.module.ts @ ./src/app/main.ts
Error: ./src/pages/admin-home/admin-home.ts
Module not found: Error: Can't resolve 'ionic-native' in 'E:\Work\myBabyFeed\myBabyFeed\src\pages\admin-home'
resolve 'ionic-native' in 'E:\Work\myBabyFeed\myBabyFeed\src\pages\admin-home'
Parsed request is a module
using description file: E:\Work\myBabyFeed\myBabyFeed\package.json (relative path: ./src/pages/admin-home)
Field 'browser' doesn't contain a valid alias configuration
after using description file: E:\Work\myBabyFeed\myBabyFeed\package.json (relative path: ./src/pages/admin-home)
resolve as module
looking for modules in E:\Work\myBabyFeed\myBabyFeed\node_modules
using description file: E:\Work\myBabyFeed\myBabyFeed\package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: E:\Work\myBabyFeed\myBabyFeed\package.json (relative path: ./node_modules)
using description file: E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\package.json (relative path: .)
no extension
Field 'browser' doesn't contain a valid alias configuration
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native is not a file
.ts
Field 'browser' doesn't contain a valid alias configuration
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native.json doesn't exist
as directory
existing directory
using path: E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\index
using description file:
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\package.json (relative path: ./index)
no extension
Field 'browser' doesn't contain a valid alias configuration
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\index doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\index.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\index.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native\index.json doesn't exist
[E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native]
[E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native.ts]
[E:\Work\myBabyFeed\myBabyFeed\node_modules\ionic-native.js]
我已经用最新版本的 ionic-native 更新了包文件,但仍然出现错误。任何人都可以帮忙