Giter Site home page Giter Site logo

Comments (6)

k-maru avatar k-maru commented on June 16, 2024

I couldn't reproduce the trouble.
Please check if the file is not there really. if you find the file in another path,let me know the path and the OS you use.

I've commit the new code, so try it please. If you could write a fix, send me pull request.

from grunt-typescript.

dmedvinsky avatar dmedvinsky commented on June 16, 2024

Here's how I reproduce it:

cd /tmp/
mkdir testproj
cd testproj/
mkdir typescript
touch typescript/index.ts
npm install grunt typescript grunt-typescript
vim grunt.js
./node_modules/.bin/grunt

Here's grunt.js file:

module.exports = function(grunt) {
    grunt.loadNpmTasks('grunt-typescript');
    grunt.initConfig({
        typescript: {
            base: {
                src: ['typescript/index.ts'],
                dest: './',
                options: {
                    module: 'amd',
                    base_path: 'typescript'
                }
            }
        },
    });
    grunt.registerTask('default', 'typescript');
};

Here's what I get:

Error: ENOENT, no such file or directory '/tmp/testproj/node_modules/grunt-typescript/node_modules/typescript/bin/typescript.js'
    at Object.fs.openSync (fs.js:338:18)
    at Object.fs.readFileSync (fs.js:182:15)
    at Object.module.exports (/tmp/testproj/node_modules/grunt-typescript/tasks/typescript.js:71:27)
    at Task.helper (/tmp/testproj/node_modules/grunt/lib/util/task.js:117:19)
    at Object.<anonymous> (/tmp/testproj/node_modules/grunt-typescript/tasks/typescript.js:55:15)
    at Object.task.registerMultiTask.thisTask (/tmp/testproj/node_modules/grunt/lib/grunt/task.js:109:15)
    at Object.task.registerTask.thisTask.fn (/tmp/testproj/node_modules/grunt/lib/grunt/task.js:58:16)
    at Task.<anonymous> (/tmp/testproj/node_modules/grunt/lib/util/task.js:341:36)
    at Task.<anonymous> (/tmp/testproj/node_modules/grunt/lib/util/task.js:317:9)
    at Task.<anonymous> (/tmp/testproj/node_modules/grunt/lib/util/task.js:344:11)

from grunt-typescript.

david-banister avatar david-banister commented on June 16, 2024

In my environment, removing typescript from the npm install allowed me to continue working. It looks like grunt-typescript depends on typescript being deployed via its dependency and blows up otherwise.

It should be fixed here because otherwise I can't specify a specific typescript version in my package.json.

from grunt-typescript.

k-maru avatar k-maru commented on June 16, 2024

thanks david!

I will respond to recursively search in the next version.

from grunt-typescript.

k-maru avatar k-maru commented on June 16, 2024

I released the new version 0.0.3.
It searches for typescript.js recursively.

from grunt-typescript.

dmedvinsky avatar dmedvinsky commented on June 16, 2024

Yep, seems to have solved it, thanks.

from grunt-typescript.

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.