Comments (5)
I had some packages missing somehow. I found this out by running:
npm -g ls
My fix was to reinstall the only globally installed packages I had:
npm install -g grunt
npm install -g pulp
it showed me a bunch of packages were missing. I'd post the exact error but I didn't have much scrollback in that shell.
from pulp.
And it's not working again...
from pulp.
Irony keeps you going... and there is no greater irony than not being able to use Purescript because of a type error 😃
I found this out by making the child process spawned in exec.js write to stdout:
cody@cody-G46VW:/tmp/hello-sailor$ diff node_modules/pulp/exec.js ~/.nvm/versions/node/v0.12.5/lib/node_modules/pulp/exec.js
9c9
< stdio: [process.stdin, process.stdout, process.stderr],
---
> stdio: [process.stdin, quiet ? "pipe" : process.stdout, process.stderr],
/tmp/hello-sailor/node_modules/pulp/exec.js:36
c.stdout.pipe(require("concat-stream")(function(data) {
^
TypeError: Cannot read property 'pipe' of null
at exec (/tmp/hello-sailor/node_modules/pulp/exec.js:36:13)
at /tmp/hello-sailor/node_modules/pulp/exec.js:47:7
at it (/tmp/hello-sailor/node_modules/pulp/files.js:21:7)
at /tmp/hello-sailor/node_modules/pulp/files.js:27:11
at f (/tmp/hello-sailor/node_modules/pulp/node_modules/glob/node_modules/once/once.js:17:25)
at Glob.<anonymous> (/tmp/hello-sailor/node_modules/pulp/node_modules/glob/glob.js:132:7)
at Glob.emit (events.js:107:17)
at Glob._finish (/tmp/hello-sailor/node_modules/pulp/node_modules/glob/glob.js:171:8)
at done (/tmp/hello-sailor/node_modules/pulp/node_modules/glob/glob.js:158:12)
at Glob._processReaddir2 (/tmp/hello-sailor/node_modules/pulp/node_modules/glob/glob.js:353:12)
from pulp.
Okay, figuring this out now.
pulp build -t main.js
Running the above, the following is the value of r in the context of the function on line 28 of exec.js:
Reading ./output/Prelude.Unsafe/externs.purs
Reading ./output/Data.Function/externs.purs
Reading ./output/Control.Monad.Eff/externs.purs
Reading ./output/Control.Monad.Eff.Unsafe/externs.purs
Reading ./output/Control.Monad.ST/externs.purs
Reading ./output/Debug.Trace/externs.purs
Reading ./output/Main/externs.purs
If I add the seemingly unrelated -O (dead code elimination) I get a file as I should. The value of r is the file itself.
So the bug here is that a file is only written if the seemingly unrelated -O flag is specified.
from pulp.
Yes, sorry, I noticed the same thing yesterday. Essentially, pulp
calls psc-make
to build normally, which generates output
, and psc
if you specify -O
. --to
is specifically an argument for psc
. I think I'd rather have --to
be the determinant and -O
the extra argument, so that if you specify --to
it calls psc
regardless, and if you specify -O
without --to
it terminates with an error.
from pulp.
Related Issues (20)
- Building dependencies only or first HOT 1
- is there a way to build only dependencies? HOT 1
- Allow pulp init with superuser access
- Unable to run pulp init using volta which shims purs into my path HOT 11
- Lua backend HOT 1
- psc-package asks for bower.json OR psc-package.json and then requires bower.json anyway HOT 2
- Have trouble to specify license to run `pulp version` HOT 3
- Dead link in README.md (using npm as your build tool)
- Pulp test no longer seems to work with purs 0.13.8 HOT 5
- Suggest Spago in README
- `pulp publish` doesn't support --dry-run HOT 2
- Add support for publishing to the PureScript registry
- Add support for upcoming 0.15.0 PureScript release
- Remove bower re-install code in `integration.js` HOT 1
- Determine how bundling works with PureScript v0.15.0 version HOT 2
- Versioning confusion HOT 5
- Fix the documentation on releasing packages HOT 4
- Drop the `devDependencies` check when publishing on PureScript `0.15.2` or greater
- `pulp publish` fails for large bower resolution file
- How can I get the docs generator to just generate docs for my files HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pulp.