Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error #3

Open
madoar opened this issue Jan 31, 2017 · 2 comments
Open

Build error #3

madoar opened this issue Jan 31, 2017 · 2 comments

Comments

@madoar
Copy link

madoar commented Jan 31, 2017

After running npm install followed by npm run build I get the following error on my laptop:

marc@marc-ThinkPad-X1-Carbon ~/git/angular2-library $ npm run build

[email protected] build /home/marc/git/angular2-library
rimraf dist && ngc -p src/tsconfig.aot.json && gulp

Error at /home/marc/git/angular2-library/node_modules/@types/lodash/index.d.ts:244:13: Duplicate identifier ''.
Error at /home/marc/git/angular2-library/node_modules/@types/lodash/index.d.ts:248:19: Duplicate identifier '
'.
Error at /home/marc/git/angular2-library/node_modules/@types/lodash/index.d.ts:11444:21: ']' expected.
Error at /home/marc/git/angular2-library/node_modules/@types/lodash/index.d.ts:11444:22: ';' expected.
Error at /home/marc/git/angular2-library/node_modules/@types/lodash/index.d.ts:11444:23: Declaration or statement expected.
Error at /home/marc/git/angular2-library/node_modules/@types/lodash/index.d.ts:11444:33: ']' expected.
Error at /home/marc/git/angular2-library/node_modules/@types/lodash/index.d.ts:11444:34: ')' expected.
Error at /home/marc/git/angular2-library/node_modules/@types/lodash/index.d.ts:11444:35: Declaration or statement expected.
Error at /home/marc/git/angular2-library/node_modules/@types/lodash/index.d.ts:11444:37: Declaration or statement expected.
Error at /home/marc/git/angular2-library/node_modules/@types/lodash/index.d.ts:19441:1: Declaration or statement expected.

npm ERR! Linux 4.4.0-59-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: rimraf dist && ngc -p src/tsconfig.aot.json && gulp
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script 'rimraf dist && ngc -p src/tsconfig.aot.json && gulp'.
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 angular2-sdk package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! rimraf dist && ngc -p src/tsconfig.aot.json && gulp
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-sdk
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-sdk
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/marc/git/angular2-library/npm-debug.log

I'm not sure why I get this error on my laptop, because I don't get it on my laptop.
My node version is v4.2.6 and my npm version is 3.5.2. I've changed nothing inside the angular2-library project after my checkout.

I get an error too, when I try to run npm test:

marc@marc-ThinkPad-X1-Carbon ~/git/angular2-library $ npm test

[email protected] pretest /home/marc/git/angular2-library
npm run lint

[email protected] lint /home/marc/git/angular2-library
tslint --force "src/**/*.ts"

src/components/hello-world/HelloWorld.component.ts[15, 2]: file should end with a newline
src/components/hello-world/HelloWorld.component.ts[8, 15]: The selector of the component "HelloWorldComponent" should have prefix "my" (https://goo.gl/cix8BY)
src/components/hello-world/HelloWorld.module.ts[17, 2]: file should end with a newline
src/components/hello-world/HelloWorld.spec.ts[24, 4]: file should end with a newline
src/components/index.ts[1, 31]: file should end with a newline
src/index.ts[1, 30]: file should end with a newline

[email protected] test /home/marc/git/angular2-library
karma start

31 01 2017 13:00:56.164:ERROR [preprocess]: Can not load "webpack"!
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

  • configuration.entry should be one of these:
    object { : non-empty string | [non-empty string] } | non-empty string | [non-empty string] | function
    The entry point(s) of the compilation.
    Details:
    • configuration.entry should NOT have less than 1 properties ({
      "keyword": "minProperties",
      "dataPath": ".entry",
      "schemaPath": "#/oneOf/0/minProperties",
      "params": {
      "limit": 1
      },
      "message": "should NOT have less than 1 properties",
      "schema": 1,
      "parentSchema": {
      "minProperties": 1,
      "additionalProperties": {
      "oneOf": [
      {
      "description": "The string is resolved to a module which is loaded upon startup.",
      "minLength": 1,
      "type": "string"
      },
      {
      "description": "All modules are loaded upon startup. The last one is exported.",
      "$ref": "#/definitions/common.nonEmptyArrayOfUniqueStringValues"
      }
      ]
      },
      "description": "Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array.",
      "type": "object"
      },
      "data": {}
      }).
      object { : non-empty string | [non-empty string] }
      Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array.
    • configuration.entry should be a string.
    • configuration.entry should be an array:
      [non-empty string]
    • configuration.entry should be an instance of function
      function returning an entry object or a promise..
      at webpack (/home/marc/git/angular2-library/node_modules/webpack/lib/webpack.js:19:9)
      at new Plugin (/home/marc/git/angular2-library/node_modules/karma-webpack/lib/karma-webpack.js:63:18)
      at invoke (/home/marc/git/angular2-library/node_modules/di/lib/injector.js:75:15)
      at Array.instantiate (/home/marc/git/angular2-library/node_modules/di/lib/injector.js:59:20)
      at get (/home/marc/git/angular2-library/node_modules/di/lib/injector.js:48:43)
      at /home/marc/git/angular2-library/node_modules/di/lib/injector.js:71:14
      at Array.map (native)
      at Array.invoke (/home/marc/git/angular2-library/node_modules/di/lib/injector.js:70:31)
      at null.get (/home/marc/git/angular2-library/node_modules/di/lib/injector.js:48:43)
      at instantiatePreprocessor (/home/marc/git/angular2-library/node_modules/karma/lib/preprocessor.js:55:20)
      at Array.forEach (native)
      at createPreprocessor (/home/marc/git/angular2-library/node_modules/karma/lib/preprocessor.js:74:20)
      at Array.invoke (/home/marc/git/angular2-library/node_modules/di/lib/injector.js:75:15)
      at get (/home/marc/git/angular2-library/node_modules/di/lib/injector.js:48:43)
      at /home/marc/git/angular2-library/node_modules/di/lib/injector.js:71:14
      at Array.map (native)
      at null.invoke (/home/marc/git/angular2-library/node_modules/di/lib/injector.js:70:31)
      at null.Server.start (/home/marc/git/angular2-library/node_modules/karma/lib/server.js:103:18)
      at Object.exports.run (/home/marc/git/angular2-library/node_modules/karma/lib/cli.js:280:26)
      at Object. (/home/marc/git/angular2-library/node_modules/karma/bin/karma:3:23)
      at Module._compile (module.js:410:26)
      at Object.Module._extensions..js (module.js:417:10)
      at Module.load (module.js:344:32)
      at Function.Module._load (module.js:301:12)
      at Function.Module.runMain (module.js:442:10)
      at startup (node.js:136:18)
      at node.js:966:3

START:
31 01 2017 13:00:56.208:INFO [karma]: Karma v1.3.0 server started at http://localhost:9876/
31 01 2017 13:00:56.209:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
31 01 2017 13:00:56.210:ERROR [karma]: Found 1 load error

[email protected] posttest /home/marc/git/angular2-library
remap-istanbul -i coverage/json/coverage-final.json -o coverage/html -t html

[Error: Cannot find file: "coverage/json/coverage-final.json"]

@jovermier
Copy link

I am getting the same lodash/index.d.ts errors using.
Node ver 6.10.0
npm ver 3.10.10

@madoar
Copy link
Author

madoar commented Mar 23, 2017

It's been a while, since I've reported this issue. As far as I remember this problem was created by a dependency update. I've solved this in my project by fundamentally updating all dependencies, if you want to look at my library as a reference see https://github.com/madoar/ng2-archwizard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants