Comments (12)
@ydubois-fr I dug into the node_modules folder and found each module's .node file that it generated and put it in the root directory beside the generated executable. Note that these .node files are native to the platform they were created on.
from pkg.
The error you see with grcp is the same one both Socket.io and bcrypt throw as well. I'm trying to sort out the issue as this is the only blocking one for myself currently.
> Warning Cannot resolve 'binding_path'
/Users/steven.lambe/iot/node_modules/bcrypt/bcrypt.js
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option.
> Warning Cannot resolve 'this.wsEngine'
/Users/steven.lambe/iot/node_modules/engine.io/lib/server.js
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option.
from pkg.
To follow up on this, I've tried the following in my package.json file to no success:
"pkg": {
"scripts": [
"./node_modules/bcrypt/bcrypt.js",
"./node_modules/engine.io/lib/server.js"
]
}
In the readme it sounds like this is what is being asked for, but I continue to get the issues after adding them as such. As I stated previously, this is the only blocking issue for my project right now if someone can point out what I am missing.
from pkg.
Please try again with [email protected]
but be aware that you must deploy your .node
files along with executable. https://github.com/zeit/pkg#native-addons
from pkg.
OK, everything works for me now, this is sexy...
from pkg.
Hi firrae,
can you explain how you resolve your problem ?
Thanks
from pkg.
@firrae
Thanks for your help.
Sorry, i'm a newbie with node
I have the same problem that you with socket.io :
Warning Cannot resolve 'this.wsEngine'
D:\test\node_modules\engine.io\lib\server.js
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option.
I copy the file "server.js" beside the generated executable.....no result.
What file did you copy beside to the executable ? (server.js ? the folder "engine.io" ?)
from pkg.
@ydubois-fr hmm, I didn't need to copy anything for Socket.io after upgrading to [email protected]. Can you fill me in on what OS you are on and copy any log you get here? That might help identify what the issue might be.
Also check that you have the latest pkg installed via npm i -g pkg
.
from pkg.
@firrae my node version is v7.10.0, my pkg version is 3.0.3. My OS is windows 10.
I reinstall all my node modules.
I have the warning message when i compile my file.
When i launch my generated executable, all is ok but when i try to communicate with the browser, nothing....socket.io don't work.
Thanks for your help
from pkg.
@ydubois-fr You need to specify 'assets' directory as assets. For example, create package.json:
{
"name": "views",
"bin": "views.js",
"pkg": {
"assets": "assets"
}
}
and then run pkg package.json
from pkg.
@Igoklopov PERFECT..... Thank you very much.....you solve my problem....everything works.....Thanks you. It's perfect.
@firrae Thank you for your help and the interest that you have brought to my problem. thanks a lot for your help
from pkg.
Sorry for so late reply, Thanks @igorklopov @firrae @ydubois-fr, I'll try again later.
from pkg.
Related Issues (20)
- ffi-napi Error: Dynamic Linking Error: Win32 error 126
- Trojan.disco detected by VirusTotal HOT 12
- pkg with worker_threads HOT 12
- "[Error 2] No such file or directory" for the file that is exist in the module directory HOT 1
- pkg 5.8.1 somehow lists pkg-fetch 3.4.2 as required dependency in package-lock.json. How to update it so 3.5 is leveraged? HOT 4
- MacOS GitHub actions โย Error: spawn Unknown system error -86 HOT 4
- Module-Alias not working with pkg HOT 1
- Cannot build base binary for FreeBSD
- Latest arm64 macOS binary does not work when built on Ubuntu HOT 2
- there is something evil bug when we start a exe which is created by pkg
- Failed to compile Gluon applications correctly
- Issue #1962 should not be closed
- Not working with selenium-webdriver HOT 2
- Error! No available node version satisfies 'node20' HOT 4
- Deprecated subdependencies (babel, npmcli, ts-evaluator, and w3c-hr-time)
- fs.promises.access doesn't work in /snapshot HOT 2
- Error! Not more than one entry file/directory is expected HOT 1
- pkg can't use execFile correctly HOT 1
- notice pkg has a serious bug when we use child_process exec exec,execFile spawn HOT 1
- cpSync with recurse:true results in ENOENT
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 pkg.