thomann061 / fmrest

A Node.js wrapper for Filemaker's Data API (REST API)
https://thomann061.github.io/fmrest/
MIT License
28 stars 4 forks source link

Unusable without modification to package.json #4

Closed davidsilverthorn-paradigm closed 4 years ago

davidsilverthorn-paradigm commented 5 years ago

For me, running Node 10.15.3 on Windows 10, I get a seemingly endless number of errors from fmrest until I modify package.json.

I had to update "main": "gulpfile.js", to "main": "./lib/fmrest.js", to prevent errors.

beargie commented 5 years ago

Not sure if @davidsilverthorn-paradigm is using gulp, but if so, then there's probably a different gulpfile.js setting that needs to be fixed in his install.

A sample vanilla node project running on node 10.8.0 for me has a package.json file that looks like this:

{
  "name": "fmNodeProject",
  "version": "1.0.0",
  "description": "Some Project Description",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "mbeargie",
  "license": "ISC",
  "dependencies": {
    "fmrest": "^2.2.1"
  }
}

There is no "main" tag in the standard JSON generated by npm init at all.

I can't duplicate the issue here with a standard installation of this package using npm install fmrest

davidsilverthorn-paradigm commented 5 years ago

What version of npm are you using? Main is certainly a standard tag. Even your example has it.

Furthermore, I had to modify the package.json file in fmrest, not my own project, to get it working.

beargie commented 5 years ago

Thanks for the clarification NPM 6.4.0 on my end.

beargie commented 5 years ago

I tested this further and it does appear that gulpfile.js is the correct pointer and is in the main directory: https://github.com/thomann061/fmrest/blob/master/gulpfile.js

but it does NOT work for including the required package files to implement fmrest, and will error out if you try and include it.

@thomann061 please update your next release to correct for this.

thomann061 commented 4 years ago

Is this still an issue?

belac9615 commented 4 years ago

@thomann061 Yes, this is still an issue.