-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Can't resolve 'crossfilter' in '~node_modules\dc' #6354
Comments
@alexkibler Is there a repo replicating the issue? |
@sumitarora Sure, I've just created one: https://github.com/alexkibler/DCJSCrossfilterProblem If you clone and npm install followed by ng build, you'll see it blows up with the error I listed above. |
Quickly looking over the "dc" package, I wouldn't expect that to work. It has a dependency on the "crossfilter2" package not "crossfilter". |
@clydin yeah, I see that as well. It's something to do with crossfilter changing, so the dc team switched their dependency to crossfilter2 but still reference it as crossfilter. But I can't figure out how to do the "reference it as crossfilter" thing mentioned in the Issue I linked above |
this is really a fatal defect in the library. |
Right, I knew that, but that means all of our developers have to do that, and any time we want to update the version, or reinstall node_modules for whatever reason, we'll have to remember to do that. The point of this post was that webpack itself has the workaround to let you alias, and I was hoping the CLI would support this. |
Without ejecting the config, there is no support for that. As to the renaming, you could add a post install script to package.json to handle the renaming until the package is fixed. I'd also recommend raising an issue with the package, if not already present. |
That's some great advice, thanks. I'll give that a shot when I'm back in
the office tomorrow.
…On Wed, May 17, 2017, 8:27 PM clydin ***@***.***> wrote:
Without ejecting the config, there is no support for that.
As to the renaming, you could add a post install script to package.json to
handle the renaming until the package is fixed.
I'd also recommend raising an issue with the package, if not already
present.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6354 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHwp6fn5BcE3ji0PIgwfT42_5pv2mFeeks5r65B-gaJpZM4NeGq6>
.
|
Closing as above @alexkibler Please reopen the issue if needed. |
@clydin Do you have a recommendation for how to do a rename in the postinstall? Sorry, I haven't really done much with npm scripts |
Untested but something like the following should work on Linux/MacOS (not sure of the equivalent for Windows):
|
Thanks! I'm on Windows, though. For what it's worth, renaming the crossfilter directory never helped me anyway, and I actually had to rename it in a line of code in dc.js. Once I did that everything started working. One of the people from DC opened an issue in crossfilter2 to try to fix it permanently but for now I have to change that line in dc.
changes to
You wouldn't know a way to replace a line of text in a file, would you? That's where I'm struggling now, but for now I'm just going to have my team change it manually. |
There's a package called something like the following should work:
|
Yeah, I tried that, but when I gave it "node_modules/dc/dc.js" as the file, it said it couldn't find it |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
@angular/cli: 1.0.3
node: 6.10.3
os: win32 x64
@angular/common: 4.1.2
@angular/compiler: 4.1.2
@angular/core: 4.1.2
@angular/forms: 4.1.2
@angular/http: 4.1.2
@angular/platform-browser: 4.1.2
@angular/platform-browser-dynamic: 4.1.2
@angular/router: 4.1.2
@angular/cli: 1.0.3
@angular/compiler-cli: 4.1.2
Repro steps.
ng new testproj && cd testproj
npm install --save dc
replace app.component.ts with
The log given by the failure.
Desired functionality.
Let me use DC?
Mention any other details that might be useful.
This issue with dc.js makes it seem like we need to be able to add a "resolve" to the webpack config. I'm not sure that this is possible with .angular-cli.json
The text was updated successfully, but these errors were encountered: