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

Webpack 3.5.5 throw ERROR in ./node_modules/tinymce/skins/lightgray/img/loader.gif #4

Closed
kopax opened this issue Oct 30, 2017 · 1 comment

Comments

@kopax
Copy link

kopax commented Oct 30, 2017

I am trying to build into webpack 3.5.5 this component.

/* eslint-disable */

import React from 'react';
import {
  Create,
  SimpleForm,
  TextInput,
} from 'admin-on-rest';
import tinymce from 'tinymce/tinymce';
// react-tinymce use global ref
window.tinymce = tinymce;

import 'tinymce/themes/modern/theme';
import 'tinymce/skins/lightgray/skin.min.css';
import TinyMCEInput from 'aor-tinymce-input/lib/index'

export const EmailCreate = (props) => (
  <Create title="Create a Email" {...props}>
    <SimpleForm>
      <TextInput source="to" />
      <TextInput source="subject" />
      <TinyMCEInput source="text" config={{ skin: false }} />
    </SimpleForm>
  </Create>
);

When running with webpack I have:

ERROR in ./node_modules/tinymce/skins/lightgray/img/loader.gif
Module build failed: Error: spawn /usr/src/app/node_modules/gifsicle/vendor/gifsicle ENOENT
    at _errnoException (util.js:1019:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
    at onErrorNT (internal/child_process.js:374:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
 @ ./node_modules/css-loader!./node_modules/tinymce/skins/lightgray/skin.min.css 6:32349-32376
 @ ./node_modules/tinymce/skins/lightgray/skin.min.css

There are open issues and resources related:

I am not sure if this up to date.
I have tried a few times to configure using the tinymce.com advices but nothing worked.

Am I the only one getting this issue ?

@LoicMahieu
Copy link
Owner

I don't think the problem is webpack, tinymce or this module. The error is saying that gifsicle executable is not found. You certainly use a image loader that try to optimize the file and thus, try to use gifsicle.

Try to just use file-loader and see if the error happens.

See imagemin/gifsicle-bin#51

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