错误:静态解析符号值时遇到错误。调用函数'makeDecorator',不支持函数调用。

时间:2017-03-25 02:30:23

标签: node.js ionic2

当我构建ionic2项目时,我在package.json中使用了“ionic-app-scripts 1.1.4”

{
  "name": "app-daxi",
  "author": "wisesoft",
  "homepage": "http://www.baidu.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",
    "minify": "ionic-app-scripts minify"
  },
  "dependencies": {
    "@angular/common": "2.4.8",
    "@angular/compiler": "2.4.8",
    "@angular/compiler-cli": "2.4.8",
    "@angular/core": "2.4.8",
    "@angular/forms": "2.4.8",
    "@angular/http": "2.4.8",
    "@angular/platform-browser": "2.4.8",
    "@angular/platform-browser-dynamic": "2.4.8",
    "@angular/platform-server": "2.4.8",
    "@ionic/storage": "2.0.0",
    "intl": "^1.2.5",
    "ionic-angular": "2.2.0",
    "ionic-native": "2.4.1",
    "ionicons": "3.0.0",
    "ngx-uploader": "2.1.6",
    "rxjs": "5.0.1",
    "sw-toolbox": "3.4.0",
    "zone.js": "0.7.2"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^1.1.4",
    "typescript": "2.1.5"
  }
}

无论我使用ionic run build --prod还是npm run ionic:build --prod,都会出错。

[10:18:26]  ionic-app-scripts 1.1.4
[10:18:26]  build prod started ...
[10:18:26]  clean started ...
[10:18:26]  clean finished in less than 1 ms
[10:18:26]  copy started ...
[10:18:26]  ngc started ...
[10:18:33]  build prod failed: Error encountered resolving symbol values statically. Calling function 'makeDecorator',
            function calls are not supported. Consider replacing the function or lambda with a reference to an exported
            function, resolving symbol Injectable in
            E:/达西前台/whcm-app3/node_modules/ionic-angular/node_modules/@angular/core/src/di/metadata.d.ts, resolving
            symbol OpaqueToken in
            E:/达西前台/whcm-app3/node_modules/ionic-angular/node_modules/@angular/core/src/di/opaque_token.d.ts, resolving
            symbol OpaqueToken in
            E:/达西前台/whcm-app3/node_modules/ionic-angular/node_modules/@angular/core/src/di/opaque_token.d.ts
[10:18:33]  ionic-app-script task: "build"
[10:18:33]  Error: Error encountered resolving symbol values statically. Calling function 'makeDecorator', function
            calls are not supported. Consider replacing the function or lambda with a reference to an exported function,
            resolving symbol Injectable in
            E:/达西前台/whcm-app3/node_modules/ionic-angular/node_modules/@angular/core/src/di/metadata.d.ts, resolving
            symbol OpaqueToken in
            E:/达西前台/whcm-app3/node_modules/ionic-angular/node_modules/@angular/core/src/di/opaque_token.d.ts, resolving
            symbol OpaqueToken in
            E:/达西前台/whcm-app3/node_modules/ionic-angular/node_modules/@angular/core/src/di/opaque_token.d.ts
Error: Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in E:/达西前台/whcm-app3/node_modules/ionic-angular/node_modules/@angular/core/src/di/metadata.d.ts, resolving symbol OpaqueToken in E:/达西前台/whcm-app3/node_modules/ionic-angular/node_modules/@angular/core/src/di/opaque_token.d.ts, resolving symbol OpaqueToken in E:/达西前台/whcm-app3/node_modules/ionic-angular/node_modules/@angular/core/src/di/opaque_token.d.ts
    at SyntaxError.BaseError [as constructor] (E:\达西前台\whcm-app3\node_modules\.2.4.8@@angular\compiler\bundles\compiler.umd.js:1597:31)
    at new SyntaxError (E:\达西前台\whcm-app3\node_modules\.2.4.8@@angular\compiler\bundles\compiler.umd.js:1795:20)
    at simplifyInContext (E:\达西前台\whcm-app3\node_modules\.2.4.8@@angular\compiler\bundles\compiler.umd.js:25783:27)
    at StaticReflector.simplify (E:\达西前台\whcm-app3\node_modules\.2.4.8@@angular\compiler\bundles\compiler.umd.js:25795:17)
    at StaticReflector.annotations (E:\达西前台\whcm-app3\node_modules\.2.4.8@@angular\compiler\bundles\compiler.umd.js:25291:64)
    at NgModuleResolver.resolve (E:\达西前台\whcm-app3\node_modules\.2.4.8@@angular\compiler\bundles\compiler.umd.js:17771:86)
    at CompileMetadataResolver.getNgModuleMetadata (E:\达西前台\whcm-app3\node_modules\.2.4.8@@angular\compiler\bundles\compiler.umd.js:18272:64)
    at addNgModule (E:\达西前台\whcm-app3\node_modules\.2.4.8@@angular\compiler\bundles\compiler.umd.js:25053:62)
    at E:\达西前台\whcm-app3\node_modules\.2.4.8@@angular\compiler\bundles\compiler.umd.js:25064:18
    at Array.forEach (native)

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "ionic:build" "--" "--prod"
npm ERR! node v7.7.1
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! app-daxi@ ionic:build: `ionic-app-scripts build "--prod"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app-daxi@ ionic:build script 'ionic-app-scripts build "--prod"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the app-daxi package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ionic-app-scripts build "--prod"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs app-daxi
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls app-daxi
npm ERR! There is likely additional logging output above.

但是当我将我的项目复制到其他计算机时,顺序相同,一切都正常。

有人知道我的电脑有什么问题吗?

0 个答案:

没有答案