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

Cannot find module 'ng2-cable/js/index' error #60

Open
moranza opened this issue Jul 30, 2017 · 5 comments
Open

Cannot find module 'ng2-cable/js/index' error #60

moranza opened this issue Jul 30, 2017 · 5 comments

Comments

@moranza
Copy link

moranza commented Jul 30, 2017

When installing npm packages, the index file for module 'ng2-cable' does not exist, and the reference to the index file in 'yatrum/src/app/components/trips/trip-detail/trip-detail.component.ts' throws an error and the application cannot be built.

version: ng2-cable@1.1.9

@pkrawat1
Copy link
Member

@moranza Did you tried yarn install

@moranza
Copy link
Author

moranza commented Jul 30, 2017

No, this is not in the installation guide.
Is it a requirement?

@pkrawat1
Copy link
Member

Ok, will update that.
Actually If you see there is a yarn.lock file in our repos, so to install packages we use yarn install.
You might want to remove the node_modules folder first as it was build by npm.
Then run yarn install

  • rm -rf node_modules
  • yarn install or yarn
  • npm start or yarn start

@moranza
Copy link
Author

moranza commented Jul 30, 2017

After doing what you suggested:

D:\yatrum>yarn start
yarn start v0.27.5
$ ng serve
** NG Live Development Server is running on http://localhost:4200 **
Hash: c6753a5e4bf25347d4ce
Time: 30132ms
chunk {0} main.bundle.js, main.bundle.js.map (main) 185 kB {3} [initial] [rendered]
chunk {1} styles.bundle.js, styles.bundle.js.map (styles) 913 kB {4} [initial] [rendered]
chunk {2} scripts.bundle.js, scripts.bundle.js.map (scripts) 398 kB {4} [initial] [rendered]
chunk {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 4.91 MB [initial] [rendered]
chunk {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]

ERROR in Error encountered resolving symbol values statically. Calling function 'OpaqueToken', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol INITIAL_REDUCER in D:/yatrum/node_modules/@ngrx/store/src/ng2.d.ts, resolving symbol provideStore in D:/yatrum/node_modules/@ngrx/store/src/ng2.d.ts, resolving symbol StoreModule.provideStore in D:/yatrum/node_modules/@ngrx/store/src/ng2.d.ts, resolving symbol AppModule in D:/yatrum/src/app/app.module.ts, resolving symbol AppModule in D:/yatrum/src/app/app.module.ts
webpack: Failed to compile.

panozzaj added a commit to woven-teams/yatrum that referenced this issue Nov 14, 2017
This uses yarn instead of npm, as suggested by:
 - aviabird#60
@mdelgadov
Copy link

mdelgadov commented Dec 31, 2017

My two cents: I tried by deleting and recompiling with yarn and didn't work, same error.

So I deleted the repo and cloned it again, then yarn install then yarn start...

It compiled, then when calling localhost:4200 in the browser, I got:

ERROR TypeError: payloadTrips.map is not a function which makes me think on pulling my eyes out with a red hot iron...

but hey, it's progress!

I also had errors in the live demo on heroku service, but that is another story.

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

3 participants