Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

error on npm run start-watch #60

Closed
dalenoe opened this issue Dec 11, 2015 · 7 comments
Closed

error on npm run start-watch #60

dalenoe opened this issue Dec 11, 2015 · 7 comments

Comments

@dalenoe
Copy link

dalenoe commented Dec 11, 2015

ERROR in ./~/css-loader!./src/browser/index.css
Module build failed: ReferenceError: Promise is not defined

any ideas?

@LongLiveCHIEF
Copy link
Contributor

you have run npm install to make sure all of the latest deps are avaialble on your resolve path?

@dalenoe
Copy link
Author

dalenoe commented Dec 11, 2015

Yes. This is what I've followed so far.

gregkbarnes/blank-canvas@f21b1f1

After adding that, it starts with no errors.

@dalenoe
Copy link
Author

dalenoe commented Dec 11, 2015

Now, when I run npm run start. I get the mattermost window popping up, but it's a blank white screen.

@LongLiveCHIEF
Copy link
Contributor

we don't use Promise anywhere in our library, so adding a dependency for something our own modules don't use wouldn't be something we'd do.

It looks like this is a result of webpack-contrib/css-loader#144, and that you're using a very old version of node.

We do need to add an "engines" block to our package.json so a warning will be thrown when you're using a version of node prior to v4.

@dalenoe
Copy link
Author

dalenoe commented Dec 11, 2015

@H3Chief This is on a ubuntu server, with node installed using apt-get. If the library doesn't use Promise, why was I seeing that Promise error?

@geekytime
Copy link
Collaborator

This is on a ubuntu server, with node installed using apt-get.

Unfortunately, the pre-built packages in the apt-get repos are often quite outdated. 😞

Can you run node -v and check your version?

For a while a guy named Chris Lea had something called a PPA that people were using to get the more recent builds, but I think now they're trying to get people to use these nodesource distributions?

Oh wait, yeah! Here it is. Now there's Installing Node.js via package manager on the node site. That's probably your best bet.

If the library doesn't use Promise, why was I seeing that Promise error?

One of the underlying dependencies must be using the native Promise object.

@LongLiveCHIEF
Copy link
Contributor

The Webpack/css-loader package uses them. See the issue I referenced above, it explains why you're seeing the Promise error.

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

No branches or pull requests

3 participants