You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by Mohini Srivastava <mo...@datatorrent.com> on 2017/09/28 10:47:54 UTC

Unable to reflect css changes from custom less files on Superset UI

Hi,

  I am facing issues while making changes/additions to the less files and
getting that reflected on the Superset UI.

1. I am running npm run dev (to watch the source file changes). The script
correctly detects and rebuilds the source files. I can see the changes in
the /dist folder. However, when running 'superset runserver -d', the
changes are not getting reflected on the UI.

 Am i missing any step?

2. Also, I tried using wepback-dev-server with Superset and it keep giving
Cannot get/ error on browser. Config in webpack.config.js is below.

  output: {
    path: BUILD_DIR,
    filename: '[name].[chunkhash].entry.js',
    chunkFilename: '[name].[chunkhash].entry.js',
  },
  devServer: {
    contentBase: BUILD_DIR
  },


Would appreciate any help on this.

Thanks,
Mohini

Re: Unable to reflect css changes from custom less files on Superset UI

Posted by Mohini Srivastava <mo...@datatorrent.com>.
That was the problem! Thanks for running me through that.



On Fri, Sep 29, 2017 at 3:40 AM, Maxime Beauchemin <
maximebeauchemin@gmail.com> wrote:

> Are you sure you did `pip install -e .` ? You can check in ipython that
> you're actually running off of the dev env folder (as opposed to
> site-packages). To do this (when troubleshooting other people's dev env) I
> would run, in ipython `import superset` and then `superset?` which will
> print the location of the package. This should be your dev environment
> where the files you are modifying are located.
>
> You can also `pip uninstall superset` until you get an error message, and
> rerun `pip install -e .`
>
> On Thu, Sep 28, 2017 at 9:05 AM, Mohini Srivastava <mohini@datatorrent.com
> >
> wrote:
>
> > Yes, I am running the webserver in debug mode. I tried using npm run
> > dev-fast also, however, I experienced the same behaviour.
> >
> > -Mohini
> >
> > On Thu, Sep 28, 2017 at 8:46 PM, Maxime Beauchemin <
> > maximebeauchemin@gmail.com> wrote:
> >
> > > Also note the new `npm run dev-fast` command that builds subsequent
> > builds
> > > much faster (but the small downside is that it has sightly less precise
> > > source maps).
> > >
> > > Max
> > >
> > > On Thu, Sep 28, 2017 at 8:15 AM, Maxime Beauchemin <
> > > maximebeauchemin@gmail.com> wrote:
> > >
> > > > Are you running the web server in debug mode? `superset runserver -d`
> > > >
> > > > Max
> > > >
> > > > On Thu, Sep 28, 2017 at 3:47 AM, Mohini Srivastava <
> > > mohini@datatorrent.com
> > > > > wrote:
> > > >
> > > >> Hi,
> > > >>
> > > >>   I am facing issues while making changes/additions to the less
> files
> > > and
> > > >> getting that reflected on the Superset UI.
> > > >>
> > > >> 1. I am running npm run dev (to watch the source file changes). The
> > > script
> > > >> correctly detects and rebuilds the source files. I can see the
> changes
> > > in
> > > >> the /dist folder. However, when running 'superset runserver -d', the
> > > >> changes are not getting reflected on the UI.
> > > >>
> > > >>  Am i missing any step?
> > > >>
> > > >> 2. Also, I tried using wepback-dev-server with Superset and it keep
> > > giving
> > > >> Cannot get/ error on browser. Config in webpack.config.js is below.
> > > >>
> > > >>   output: {
> > > >>     path: BUILD_DIR,
> > > >>     filename: '[name].[chunkhash].entry.js',
> > > >>     chunkFilename: '[name].[chunkhash].entry.js',
> > > >>   },
> > > >>   devServer: {
> > > >>     contentBase: BUILD_DIR
> > > >>   },
> > > >>
> > > >>
> > > >> Would appreciate any help on this.
> > > >>
> > > >> Thanks,
> > > >> Mohini
> > > >>
> > > >
> > > >
> > >
> >
>

Re: Unable to reflect css changes from custom less files on Superset UI

Posted by Maxime Beauchemin <ma...@gmail.com>.
Are you sure you did `pip install -e .` ? You can check in ipython that
you're actually running off of the dev env folder (as opposed to
site-packages). To do this (when troubleshooting other people's dev env) I
would run, in ipython `import superset` and then `superset?` which will
print the location of the package. This should be your dev environment
where the files you are modifying are located.

You can also `pip uninstall superset` until you get an error message, and
rerun `pip install -e .`

On Thu, Sep 28, 2017 at 9:05 AM, Mohini Srivastava <mo...@datatorrent.com>
wrote:

> Yes, I am running the webserver in debug mode. I tried using npm run
> dev-fast also, however, I experienced the same behaviour.
>
> -Mohini
>
> On Thu, Sep 28, 2017 at 8:46 PM, Maxime Beauchemin <
> maximebeauchemin@gmail.com> wrote:
>
> > Also note the new `npm run dev-fast` command that builds subsequent
> builds
> > much faster (but the small downside is that it has sightly less precise
> > source maps).
> >
> > Max
> >
> > On Thu, Sep 28, 2017 at 8:15 AM, Maxime Beauchemin <
> > maximebeauchemin@gmail.com> wrote:
> >
> > > Are you running the web server in debug mode? `superset runserver -d`
> > >
> > > Max
> > >
> > > On Thu, Sep 28, 2017 at 3:47 AM, Mohini Srivastava <
> > mohini@datatorrent.com
> > > > wrote:
> > >
> > >> Hi,
> > >>
> > >>   I am facing issues while making changes/additions to the less files
> > and
> > >> getting that reflected on the Superset UI.
> > >>
> > >> 1. I am running npm run dev (to watch the source file changes). The
> > script
> > >> correctly detects and rebuilds the source files. I can see the changes
> > in
> > >> the /dist folder. However, when running 'superset runserver -d', the
> > >> changes are not getting reflected on the UI.
> > >>
> > >>  Am i missing any step?
> > >>
> > >> 2. Also, I tried using wepback-dev-server with Superset and it keep
> > giving
> > >> Cannot get/ error on browser. Config in webpack.config.js is below.
> > >>
> > >>   output: {
> > >>     path: BUILD_DIR,
> > >>     filename: '[name].[chunkhash].entry.js',
> > >>     chunkFilename: '[name].[chunkhash].entry.js',
> > >>   },
> > >>   devServer: {
> > >>     contentBase: BUILD_DIR
> > >>   },
> > >>
> > >>
> > >> Would appreciate any help on this.
> > >>
> > >> Thanks,
> > >> Mohini
> > >>
> > >
> > >
> >
>

Re: Unable to reflect css changes from custom less files on Superset UI

Posted by Mohini Srivastava <mo...@datatorrent.com>.
Yes, I am running the webserver in debug mode. I tried using npm run
dev-fast also, however, I experienced the same behaviour.

-Mohini

On Thu, Sep 28, 2017 at 8:46 PM, Maxime Beauchemin <
maximebeauchemin@gmail.com> wrote:

> Also note the new `npm run dev-fast` command that builds subsequent builds
> much faster (but the small downside is that it has sightly less precise
> source maps).
>
> Max
>
> On Thu, Sep 28, 2017 at 8:15 AM, Maxime Beauchemin <
> maximebeauchemin@gmail.com> wrote:
>
> > Are you running the web server in debug mode? `superset runserver -d`
> >
> > Max
> >
> > On Thu, Sep 28, 2017 at 3:47 AM, Mohini Srivastava <
> mohini@datatorrent.com
> > > wrote:
> >
> >> Hi,
> >>
> >>   I am facing issues while making changes/additions to the less files
> and
> >> getting that reflected on the Superset UI.
> >>
> >> 1. I am running npm run dev (to watch the source file changes). The
> script
> >> correctly detects and rebuilds the source files. I can see the changes
> in
> >> the /dist folder. However, when running 'superset runserver -d', the
> >> changes are not getting reflected on the UI.
> >>
> >>  Am i missing any step?
> >>
> >> 2. Also, I tried using wepback-dev-server with Superset and it keep
> giving
> >> Cannot get/ error on browser. Config in webpack.config.js is below.
> >>
> >>   output: {
> >>     path: BUILD_DIR,
> >>     filename: '[name].[chunkhash].entry.js',
> >>     chunkFilename: '[name].[chunkhash].entry.js',
> >>   },
> >>   devServer: {
> >>     contentBase: BUILD_DIR
> >>   },
> >>
> >>
> >> Would appreciate any help on this.
> >>
> >> Thanks,
> >> Mohini
> >>
> >
> >
>

Re: Unable to reflect css changes from custom less files on Superset UI

Posted by Maxime Beauchemin <ma...@gmail.com>.
Also note the new `npm run dev-fast` command that builds subsequent builds
much faster (but the small downside is that it has sightly less precise
source maps).

Max

On Thu, Sep 28, 2017 at 8:15 AM, Maxime Beauchemin <
maximebeauchemin@gmail.com> wrote:

> Are you running the web server in debug mode? `superset runserver -d`
>
> Max
>
> On Thu, Sep 28, 2017 at 3:47 AM, Mohini Srivastava <mohini@datatorrent.com
> > wrote:
>
>> Hi,
>>
>>   I am facing issues while making changes/additions to the less files and
>> getting that reflected on the Superset UI.
>>
>> 1. I am running npm run dev (to watch the source file changes). The script
>> correctly detects and rebuilds the source files. I can see the changes in
>> the /dist folder. However, when running 'superset runserver -d', the
>> changes are not getting reflected on the UI.
>>
>>  Am i missing any step?
>>
>> 2. Also, I tried using wepback-dev-server with Superset and it keep giving
>> Cannot get/ error on browser. Config in webpack.config.js is below.
>>
>>   output: {
>>     path: BUILD_DIR,
>>     filename: '[name].[chunkhash].entry.js',
>>     chunkFilename: '[name].[chunkhash].entry.js',
>>   },
>>   devServer: {
>>     contentBase: BUILD_DIR
>>   },
>>
>>
>> Would appreciate any help on this.
>>
>> Thanks,
>> Mohini
>>
>
>

Re: Unable to reflect css changes from custom less files on Superset UI

Posted by Maxime Beauchemin <ma...@gmail.com>.
Are you running the web server in debug mode? `superset runserver -d`

Max

On Thu, Sep 28, 2017 at 3:47 AM, Mohini Srivastava <mo...@datatorrent.com>
wrote:

> Hi,
>
>   I am facing issues while making changes/additions to the less files and
> getting that reflected on the Superset UI.
>
> 1. I am running npm run dev (to watch the source file changes). The script
> correctly detects and rebuilds the source files. I can see the changes in
> the /dist folder. However, when running 'superset runserver -d', the
> changes are not getting reflected on the UI.
>
>  Am i missing any step?
>
> 2. Also, I tried using wepback-dev-server with Superset and it keep giving
> Cannot get/ error on browser. Config in webpack.config.js is below.
>
>   output: {
>     path: BUILD_DIR,
>     filename: '[name].[chunkhash].entry.js',
>     chunkFilename: '[name].[chunkhash].entry.js',
>   },
>   devServer: {
>     contentBase: BUILD_DIR
>   },
>
>
> Would appreciate any help on this.
>
> Thanks,
> Mohini
>