krux / postscribe

Asynchronously write javascript, even with document.write.
MIT License
986 stars 156 forks source link

Can't build #471

Closed danielocdh closed 6 years ago

danielocdh commented 6 years ago

I tried to build on windows 10 and Ubuntu 17.04, it installs but won't build. I downloaded the zip from github then extracted it and ran install/build as mentioned on the "Developing" section of the page

For the build I get this on windows and linux respectively:

> postscribe@ build C:\Users\Dan\Desktop\postscribe-master
> gulp build

[17:30:58] Requiring external module babel-register
resolve failed for "babel-runtime": Error: Cannot find module 'babel-runtime'
resolve failed for "webpack-core": Error: Cannot find module 'webpack-core'
resolve failed for "@semantic-release": Error: Cannot find module '@semantic-release'
semantic-release WARN invalid config loglevel="notice"
semantic-release ERR! post Command "build" not recognized. Use either "pre" or "post"
> postscribe@ build /home/dan/Desktop/postscribe-master
> gulp build

[17:33:12] Requiring external module babel-register
resolve failed for "babel-runtime": Error: Cannot find module 'babel-runtime'
resolve failed for "webpack-core": Error: Cannot find module 'webpack-core'
resolve failed for "@semantic-release": Error: Cannot find module '@semantic-release'
semantic-release WARN invalid config loglevel="notice"
semantic-release ERR! post Command "build" not recognized. Use either "pre" or "post"

For the install I get this on windows an linux respectively:

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1308 packages in 62.94s
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1308 packages in 173.877s
Tymvie commented 6 years ago

@danielocdh you could try to replace es2015-loose with es2015 in package.json

danielocdh commented 6 years ago

From:

  "babel": {
    "presets": [
      "es2015-loose"

To:

  "babel": {
    "presets": [
      "es2015"

That did it, thanks.

The output was a bit different than the CDN files but I think that was all because of different versions of dependencies/compilers, should work the same.