Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.4 using unsupported import statements in compiled code #24

Open
wiledal opened this issue May 13, 2017 · 3 comments
Open

1.0.4 using unsupported import statements in compiled code #24

wiledal opened this issue May 13, 2017 · 3 comments

Comments

@wiledal
Copy link

wiledal commented May 13, 2017

[...]/node_modules/waterline-sqlite3/dist/adapter.js:1
(function (exports, require, module, __filename, __dirname) { import fs from 'fs';
                                                              ^^^^^^
SyntaxError: Unexpected token import
    at createScript (vm.js:53:10)
    at Object.runInThisContext (vm.js:95:10)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)

Docs state node 4 is supported, however these unsupported import statements are riddled in the compiled code of the project.

1.0.3 works as expected - uses require. Did something break compilation?

@goliatone
Copy link

I can't install the package itself.


> sqlite3@3.1.8 install .../authentication-server/src/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

[sqlite3] Success: ".../authentication-server/src/node_modules/sqlite3/lib/binding/node-v48-darwin-x64/node_sqlite3.node" is installed via remote

> waterline-sqlite3@1.0.4 postinstall .../authentication-server/src/node_modules/waterline-sqlite3
> npm run prepublish


> waterline-sqlite3@1.0.4 prepublish .../authentication-server/src/node_modules/waterline-sqlite3
> gulp

module.js:457
    throw err;
    ^

Error: Cannot find module 'gulp-babel'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (.../authentication-server/src/node_modules/waterline-sqlite3/gulpfile.js:2:13)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)

npm ERR! Darwin 16.6.0
npm ERR! argv "/Users/goliatone/.nvm/versions/node/v6.5.0/bin/node" "/Users/goliatone/.nvm/versions/node/v6.5.0/bin/npm" "run" "prepublish"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! waterline-sqlite3@1.0.4 prepublish: `gulp`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the waterline-sqlite3@1.0.4 prepublish script 'gulp'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the waterline-sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs waterline-sqlite3
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls waterline-sqlite3
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     .../authentication-server/src/node_modules/waterline-sqlite3/npm-debug.log
npm WARN authenticaton-server@0.0.0 No license field.
npm ERR! Darwin 16.6.0
npm ERR! argv "/Users/goliatone/.nvm/versions/node/v6.5.0/bin/node" "/Users/goliatone/.nvm/versions/node/v6.5.0/bin/npm" "i" "-S" "waterline-sqlite3@^1.0.3"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE

npm ERR! waterline-sqlite3@1.0.4 postinstall: `npm run prepublish`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the waterline-sqlite3@1.0.4 postinstall script 'npm run prepublish'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the waterline-sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run prepublish
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs waterline-sqlite3
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls waterline-sqlite3
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     .../authentication-server/src/npm-debug.log

@tom-sherman
Copy link

I got it installed but had to have gulp-babel installed locally. Then when I tried to use the package via trails, I got this error:

myproject\node_modules\waterline-sqlite3\dist\adapter.js:1
(function (exports, require, module, __filename, __dirname) { import fs from 'fs';
                                                              ^^^^^^
SyntaxError: Unexpected token import
    at createScript (vm.js:53:10)
    at Object.runInThisContext (vm.js:95:10)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (D:\wyngnut\config\database.js:31:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myproject@0.0.0 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myproject@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@swanie42
Copy link

swanie42 commented Oct 2, 2017

I am having the same exact problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants