Giter Site home page Giter Site logo

: No such file or directory about projectz HOT 14 CLOSED

bevry avatar bevry commented on May 26, 2024
: No such file or directory

from projectz.

Comments (14)

pflannery avatar pflannery commented on May 26, 2024

ah I see why, its because the above cmd line projectz compile would expect projectz to be in your path env.

Instead it should be executed like shown here

Example:
node ./node_modules/projectz/bin/projectz compile

Would be a nice feature to have this setup globally so we can run as projectz compile

from projectz.

mightyiam avatar mightyiam commented on May 26, 2024

It seems to me that if you provide something in bin then people are going to be expecting to be able to run it as an executable, not requiring node <file>.

I have it in my paths and I'm probably not the only one, since I don't even know how it got to my env.

from projectz.

pflannery avatar pflannery commented on May 26, 2024

when projectz is not installed globally then you would have to run as node ./node_modules/bin/projectz compile unless you have a special path pointing to ./node_modules/bin, (windows users wont have this path by default)

if projectz is installed globally then the bin file is detected via the bin package entry by npm and copied to npm's path so that projectz compile would work.

In both of these scenarios I'm not getting a no such file or directory error and instead it compiles correctly.

  1. What happens when you run node ./node_modules/bin/projectz compile ? does that work?
  2. Also does projectz exist in your global npm modules?

from projectz.

balupton avatar balupton commented on May 26, 2024

When using it locally, you can probably shorthand it to:

./node_modules/.bin/projectz compile

Which uses the executable that npm creates for us.

In regards to your global install, we have instructions for installing node that should fix that here, however local installs are much better in terms of everything in your project being self-contained.

from projectz.

mightyiam avatar mightyiam commented on May 26, 2024

Thank you, @pflannery and @balupton. I do not have it globally. I like it local in devDependencies.

Running ./node_modules/.bin/projectz compile also give me : No such file or directory.

from projectz.

mightyiam avatar mightyiam commented on May 26, 2024

This is v0.4.1.

from projectz.

pflannery avatar pflannery commented on May 26, 2024

whats your os? is it ubuntu?

what happens when you run node does that error also?

from projectz.

mightyiam avatar mightyiam commented on May 26, 2024

It is Ubuntu 15.04.

$ node gets me into node shell. Otherwise I wouldn't be able to get any work done 😸

from projectz.

RobLoach avatar RobLoach commented on May 26, 2024

Confirmed on Ubuntu 14.10...

$ ./node_modules/.bin/projectz compile
: No such file or directory
$ node ./node_modules/.bin/projectz compile
info: Initialising project
$ ./node_modules/.bin/projectz --version
: No such file or directory
$ node ./node_modules/.bin/projectz --version
0.4.1
$ npm install projectz -g
$ projectz
: No such file or directory

from projectz.

pflannery avatar pflannery commented on May 26, 2024

ok I can recreate this on ubuntu 14.04.

when I run node ./node_modules/projectz/out/bin/projectz.js compile it works. I will keep looking

from projectz.

pflannery avatar pflannery commented on May 26, 2024

I think what's happened is that publishing the npm package from my windows box has put crlf's in to all the package files. There is an issue here

I dont usually have crlf in any of my projects but they seem to of crept back in some where along the lines.

I'm going to sort my git settings out and submit a patch...I've also noticed an issue when using the -d option so i will fix that too

from projectz.

pflannery avatar pflannery commented on May 26, 2024

Turns out Github for Windows is ignoring my git line ending preferences and using CRLF in every clone I make. Will have to use the terminal to clone from now on :'( (hoping for a fix)

from projectz.

pflannery avatar pflannery commented on May 26, 2024

fixed in 921d628

@mightyiam please confirm

from projectz.

mightyiam avatar mightyiam commented on May 26, 2024

Thank you, @pflannery. Confirmed fixed.

from projectz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.